IDimElementArray.Element

Syntax

Element(ElementNumber: Integer): Integer;

Parameters

ElementNumber — element index in the array.

Description

The Element property returns element index in the dictionary by element index in the array.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

ElemArr: IDimElementArray;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dimen := MB.ItemById("D_TO").Open(Null) As IDimInstance;

Elem := Dimen.Elements;

ElemArr := Elem.Children(0);

i := ElemArr.Element(ElemArr.Count - 1);

End Sub Main;

After executing the example the "i" variable contains index of the last child element of the first dictionary element.

See also:

IDimElementArray