IRdsDictionaryElementList.Item

Syntax

Item(Index: Integer): IRdsDictionaryElement;

Parameters

Index - element index in a collection.

Description

The Item property returns an element, which index is passed by the Index parameter.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub Main;

Var

MB: IMetabase;

Attrs: IRdsAttributes;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

ElementList: IRdsDictionaryElementList;

Element: IRdsDictionaryElement;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

Attrs := Dict.Attributes;

DictInst := Dict.Open(Null);

Elements := DictInst.Elements;

ElementList := Elements.Item(1).Children;

For i := 0 To ElementList.Count - 1 Do

Element := ElementList.Item(i);

Debug.WriteLine(Element.Name);

End For;

End Sub Main;

After executing the example names of all child elements of the first element of the MDM dictionary are displayed in the console.

See also:

IRdsDictionaryElementList