IMetaHierarchyLevel.IsLeaf

Syntax

IsLeaf: Boolean;

Description

The IsLeaf property returns whether the given level is a leaf one. Leaf level is a level that does not have child levels. True - level is a leaf one.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.

Sub Main;

Var

Mb: IMetabase;

Rubr: IRubricator;

Facts: IMetaDictionary;

i: Integer;

Hierarchy: IMetaHierarchy;

HLevels: IMetaHierarchyLevels;

HLev: IMetaHierarchyLevel;

Begin

Mb := MetabaseClass.Active;

Rubr := MB.ItemById("OBJ_FC").Bind As IRubricator;

Facts := Rubr.Facts;

Hierarchy := Facts.DefaultHierarchy;

HLevels := Hierarchy.Levels;

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

HLev := HLevels.Item(i);

Debug.WriteLine(Level + i.ToString + : + HLev.Name);

If Not HLev.IsLeaf Then

Debug.WriteLine(Child level: + HLev.Next.Name);

End If;

End For;

End Sub Main;

After executing the example, information about the current time series database hierarchy is displayed in the console window.

See also:

IMetaHierarchyLevel