Item(Index: Integer): Variant;
Index. Element index in list.
The Item property returns primary key for the element with the specified index.
Executing the example requires a standard cube with the STD_CUBE identifier in the repository.
Sub UserProc;
Var
MB: IMetabase;
Cube: IStandardCube;
CustDim: ICustomDimension;
CustDimTree: ICustomDimTree;
TreeChild: ICustomDimTreeChildren;
i: Integer;
v: Variant;
Begin
MB := MetabaseClass.Active;
Cube := MB.ItemById("STD_CUBE").Edit 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;
(Cube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the development environment console displays names of all child elements for the first root element of fact dimension.
See also: