Below is the example of using the OpenDim operation to open a parametric dictionary of the repository. The request contains the moniker of the object that is a dictionary and parameter values. It is expected that parameters in the dictionary structure have the YEAR_START and YEAR_FINISH identifiers. The response contains the opened dictionary moniker. Any additional data of the dictionary is not obtained.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier section.
{
"OpenDim" :
{
"tObject" :
{
"id" : "S1!M!128"
},
"tArg" :
{
"openArgs" :
{
"args" :
{
"it" :
[
{
"k" : "18446744073709551615",
"id" : "YEAR_START",
"value" : "2000"
},
{
"k" : "18446744073709551615",
"id" : "YEAR_FINISH",
"value" : "2001"
}
]
}
}
}
}
}
{
"OpenDimResult" :
{
"id" :
{
"id" : "S1!M!S!S2"
}
}
}
public static OpenDimResult OpenParamDimension(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenDim()
{
tArg = new OpenDimArg()
{
openArgs = new DmOpenArgs()
{
//Parametric dictionary parameters
args = new OdArg[2]
{
new OdArg(){id = "YEAR_START", value = "2000", k = ulong.MaxValue},
new OdArg(){id = "YEAR_FINISH", value = "2001", k = ulong.MaxValue}
}
}
},
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open parametric dictionary
var tResult = somClient.OpenDim(tOpen);
return tResult;
}
See also: