OpenMsResult OpenMs(OdId tOb, OpenMsArg tArg)
tOb. Modeling object moniker.
tArg. Parameters of opening the modeling container.
The OpenMs operation opens a modeling container and returns context for working with container objects.
To open a modeling container, specify in the tOb field moniker of the repository object that is a modeling container, or moniker of one of the container child objects: model, metamodel or task. The moniker can be obtained on executing the GetObjects operation.
If the OpenMs operation is used to create a modeling container, the tOb parameter must contain moniker of the current repository connection.
The tArg field may contain:
Mode of modeling container opening: view or edit.
Modeling container creation parameters.
Metadata extraction pattern.
IMPORTANT. If the tArg.args.onlyProblem field is set to True in opening parameters, the tOb field can have only moniker of the modeling problem.
If the modeling container is opened for view, and the user does not need metadata, the OpenMsArg empty structure is passed in the tArg field.
After executing the OpenMs operation returns moniker of opened modeling container instance and the metadata, if a pattern was defined in the tArg.metaGet field. Use the GetMs and SetMs operations to further work with the opened modeling container and its child objects. To close the opened container instance, use the CloseMs operation.
Various methods of using this operation are given in the following examples:
Example name |
Creating a Modeling Container |
Opening Modeling Container |
Opening Modeling Container for Edit |
Opening Modeling Container and Extracting Scenario Data |
See also: