IDimHierarchies.Count

Syntax

Count: Integer;

Description

The property is read-only.

The Count property returns the number of alternative hierarchies for dictionary.

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