Levels: IMetaHierarchyLevels;
The Levels property returns levels of the hierarchy.
Executing the example requires that the repository contains a time series database with the OBJ_FC identifier. Add links to the Metabase, Rds, Cubes system assemblies.
Sub UserProc;
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);
End For;
End Sub UserProc;
After executing the example, information about the current time series database hierarchy is displayed in the console window.
See also: