Below is the example of using the GetDimMetadata operation to get information about child elements of the dictionary. The request contains the dictionary moniker and the pattern, in which specify whether to get information about selection schemas, groups of elements and alternative hierarchies of the dictionary. The response contains the obtained information.
{ "GetDimMetadata" : { "tDim" : { "id" : "S1!M!S!S1" }, "tArg" : { "pattern" : { "obInst" : "false", "getHiers" : "true", "getGroups" : "true", "getSchemas" : "true" } } } }
{ "GetDimMetadataResult" : { "id" : { "id" : "S1!M!S!S1" }, "data" : { "hiers" : { "it" : { "k" : "1", "id" : "SOURCE1", "n" : "Dim_1 (En)", "vis" : "1" } }, "groups" : { "it" : { "k" : "157", "id" : "GROUP1", "n" : "Group of elements (by list)", "vis" : "0" } }, "schemas" : { "it" : { "k" : "158", "id" : "SCHEME1", "n" : "Selection scheme (by list)", "vis" : "0" } } } } }
The specified GetChildrenObjectInfo function returns information about child objects of the dictionary. The dictionary instance moniker is sent as an input parameter. In the function body specify the pattern with the dictionary blocks, information on which needs to be obtained. The result of the function is the result of the operation.
public static GetDimMetadataResult GetChildrenObjectInfo(DmId moniker) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tMeta = new GetDimMetadata() { tArg = new GetDimMetadataArg() { pattern = new DmMetadataPattern() { getGroups = true, getHiers = true, getSchemas = true, obInst = false } }, tDim = moniker }; //Get information on dictionary structure var result = somClient.GetDimMetadata(tMeta); return result; }
See also: