ICustomDimension.Tree

Syntax

Tree: ICustomDimTree;

Description

The Tree property returns dictionary elements displayed as a tree.

Example

Executing the example requires a standard cube with the STD_CUBE identifier in the repository.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Cube: IStandardCube;

CustDim: ICustomDimension;

CustDimTree: ICustomDimTree;

Key, Key1, Key2, Key3: Variant;

Begin

MB := MetabaseClass.Active;

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

Cube := MObj As IStandardCube;

CustDim := Cube.FactDimension.Dimension As ICustomDimension;

CustDimTree := CustDim.Tree;

Key := CustDimTree.Add(Null);

Key1 := CustDimTree.Add(Null);

Key2 := CustDimTree.Add(Key);

Key3 := CustDimTree.Add(Key1);

CustDimTree.Name(Key) := "First root";

CustDimTree.Name(Key1) := "Second root";

CustDimTree.Name(Key2) := "First child";

CustDimTree.Name(Key3) := "Second child";

MObj.Save;

End Sub Main;

After executing the example new elements are created in fact dimension. Elements are displayed as a tree.

See also:

ICustomDimension