OpenCubeResult OpenCube(OdId tOb, OpenCubeArg tArg)
tOb. Moniker of the object that is a cube.
tArg. Parameters of cube opening.
The OpenCube operation opens a repository cube and returns context for working with cube's structure.
The operation enables the user to access the structure and settings of various repository cubes. To execute the operation, in the tOb parameter specify moniker of the object that is a cube, and in the tArg parameter specify parameters of its opening. The object moniker can be obtained on executing the GetObjects operation. In the tArg.metaGet field specify the pattern that will be used to open cube metadata on opening. If the tArg.metaGet field is not determined, the operation results only in the opened cube instance moniker.
To further work with the cube, use the GetCube and SetCube operations. Use the CloseCube operation to close the cube instance.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"OpenCube" :
{
"tOb" :
{
"id" : "S1!M!5857"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}
{
"OpenCubeResult" :
{
"id" :
{
"id" : "S1!M!S!C1"
}
}
}
public static OpenCubeResult OpenCube(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenCube()
{
tArg = new OpenCubeArg()
{
args = new CubeOpenArgs()
{
bind = true,
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open cube
var tResult = somClient.OpenCube(tOpen);
return tResult;
}
See also: