IDimElements.Child

Syntax

Child(Element: Integer; ChildIndex: Integer): Integer;

Parameters

Element — index of parent element.

ChildIndex — index of a child element relative to parent.

Description

The Child property returns index of the dictionary element that represents a child of the Element element and has the ChildIndex index relative to root element.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

i: Integer;

Begin

MB:=MetabaseClass.Active;

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

Elem:=Dimen.Elements;

i:=Elem.Child(10,Elem.ChildrenCount(10)-1);

End Sub Main;

After executing the example the "i" variable contains index of the last child of the tenth dictionary element. Repository object identifier: D_TO.

See also:

IDimElements