ICustomDimTree.Children

Syntax

Children(PrimaryKey: Variant): ICustomDimTreeChildren;

Parameters

PrimaryKey. Primary key of the element which child elements are to be obtained.

Description

The Children property returns a list of child elements for the selected element.

Example

Executing the example requires a standard cube with the CUBE_1 identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Cube: IStandardCube;

CustDim: ICustomDimension;

CustDimTree: ICustomDimTree;

TreeChild: ICustomDimTreeChildren;

i: Integer;

v: Variant;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("CUBE_1").Edit;

Cube := MObj As IStandardCube;

CustDim := Cube.FactDimension.Dimension As ICustomDimension;

CustDimTree := CustDim.Tree;

TreeChild := CustDimTree.RootChildren;

v := TreeChild.Item(0);

TreeChild := CustDimTree.Children(v);

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

Debug.WriteLine(CustDimTree.Name(TreeChild.Item(i)));

End For;

MObj.Save;

End Sub Main;

After executing the example the development environment console displays names of all child elements for the first root element of fact dimension.

See also:

ICustomDimTree