Show contents 

Rds > Rds Assembly Interfaces > IMetaDictionary > IMetaDictionary.DefaultHierarchy

IMetaDictionary.DefaultHierarchy

Syntax

DefaultHierarchy: IMetaHierarchy;

Description

The DefaultHierarchy property returns the time series database hierarchy.

Example

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

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
Var
    Mb: Imetabase;
    Rubr: IRubricator;
    Facts: IMetaDictionary;
    i: Integer;
    Hierarchy: IMetaHierarchy;
    HLevels: IMetaHierarchyLevels;
    HLev: IMetaHierarchyLevel;
    HAttributes: IMetaHierarchyAttributes;
    Att: IMetaAttribute;
    Conds: IOrmConditions;
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;
    HAttributes := Hierarchy.Attributes;
    For i := 0 To HAttributes.Count - 1 Do
        Att := HAttributes.Item(i);
        Debug.WriteLine(Attribute  + i.ToString +  :  + Att.Name);
    End For;
    Conds := Hierarchy.CustomWhere;
    If Conds = Null Then
        Debug.WriteLine("Additional condition is not set");
    End If;
End Sub UserProc;

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

See also:

IMetaDictionary