OpenSegContResult OpenSegCont(OdId tOb, OpenSegContArg tArg)
tOb. Moniker of repository object that is a cube segment container.
tArg. Operation execution parameters.
The OpenSegCont operation opens a cube segment container.
To execute the operation, in the tOb field specify moniker of the object that is a segment container, and in the tArg field specify opening parameters. The object moniker can be obtained on executing the GetObjects operation. In the tArg field one can specify opening mode (view or edit) and a pattern to get metadata. The pattern indicates the information to be obtained on opening.
The operation results in the moniker of opened segment container instance, and also metadata if the tArg.metaGet field was defined on executing the operation.
Further work is executed using the GetSegCont and SetSegCont operations. To save changes, use the SaveObject operation.
To close the opened object instance, use the CloseSegCont operation.
Below is the example of opening a segment container for edit. The request contains moniker of repository object that is a segment container. The response contains the obtained moniker of opened segment container instance.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier article.
{
"OpenSegCont" :
{
"tOb" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!317162"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}
{
"OpenSegContResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG"
},
"readOnly" : "0"
}
}
public static OpenSegContResult OpenSegCont(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenSegCont()
{
tArg = new OpenSegContArg()
{
args = new SegContOpenArgs()
{
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open segment container
var tResult = somClient.OpenSegCont(tOpen);
return tResult;
}
See also: