Below is the example of using the GetDimElements operation to get information about all dictionary elements. The request contains moniker of opened dictionary instance. The response contains basic information about the elements: key, name, elements level and indication of child elements.
{ "GetDimElements" : { "tDim" : { "id" : "S1!M!S!S1" }, "tArg" : "" } }
{ "GetDimElementsResult" : { "els" : { "e" : [ { "n" : "Item 1", "k" : "1", "h" : "1", "o" : "0" }, { "n" : "Item 2", "k" : "2", "h" : "1", "o" : "1" }, { "n" : "Item 3", "k" : "3", "h" : "0", "o" : "2" }, { "n" : "Item 4", "k" : "4", "h" : "0", "o" : "0" } ] }, "id" : { "id" : "S1!M!S!S1" } } }
The specified GetElementsInfo function returns information about dictionary elements. The dictionary instance moniker is sent as an input parameter. The function body specifies the required operation execution parameters. The result of the function is the result of the operation.
public static GetDimElementsResult GetElementsInfo(DmId moniker) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tElements = new GetDimElements() { tArg = new GetDimElementsArg(), tDim = moniker }; //Get information on dictionary elements var result = somClient.GetDimElements(tElements); return result; }
See also: