IDimHierarchies.Item

Syntax

Item(Index: Integer): IDimHierarchy;

Parameters

Index - hierarchy index in the collection.

Description

The property is read-only.

The Item property returns alternative hierarchy from the collection based on its index.

Example

Executing the example requires that the repository contains a dictionary with the TB_BASE identifier.

Sub Main;

Var

Mb: IMetabase;

OriginalModelObj: IMetabaseObject;

OriginalModel: IDimensionModel;

Hierarchies: IDimHierarchies;

i: Integer;

Hierarchy: IDimHierarchy;

Begin

Mb := MetabaseClass.Active;

OriginalModelObj := Mb.ItemById("TB_BASE").Edit;

OriginalModel := OriginalModelObj As IDimensionModel;

Hierarchies := OriginalModel.Hierarchies;

Debug.WriteLine("Dictionary hierarchies '" + OriginalModelObj.Name + "':");

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

Hierarchy := Hierarchies.Item(i);

Debug.WriteLine(" Name: " + Hierarchy.Name);

Debug.WriteLine(" ID: " + Hierarchy.Id);

Debug.WriteLine(" Key: " + Hierarchy.Key.ToString);

Debug.WriteLine("------");

End For;

End Sub Main;

After executing the example development environment console displays information on alternative hierarchies in the TB_BASE dictionary.

See also:

IDimHierarchies