Element(ElementNumber: Integer): Integer;
ElementNumber — element index in the array.
The Element property returns element index in the dictionary by element index in the array.
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: