Children(Element: Integer): IRdsDictionaryElementArray;
Element - element key.
The Children property returns an array that contains keys of child elements for the element, which key is passed by the Element parameter.
Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.
Sub Main;
Var
MB: IMetabase;
Dict: IRdsDictionary;
DictInst: IRdsDictionaryInstance;
Elements: IRdsDictionaryElements;
Arr: IRdsDictionaryElementArray;
Attrs: IRdsAttributes;
i, j: Integer;
Begin
MB := MetabaseClass.Active;
Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
Attrs := Dict.Attributes;
j := Attrs.Name.Key; // attribute key
DictInst := Dict.Open(Null);
Elements := DictInst.Elements;
Arr := Elements.Children(Elements.Item(1).Key);
For Each i In Arr Do
Debug.WriteLine(Elements.Attribute(i, j));
End For;
End Sub Main;
After executing the example values of the Name attribute are displayed in the console for all child elements of the first root element of a dictionary.
See also: