Next: IMetaHierarchyLevel;
The Next property returns the next level in hierarchy.
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: