Level(Attribute: IMetaAttribute): IMetaHierarchyLevel;
Attribute - attribute.
The Level property returns the level that the specified attribute belongs to.
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;
HAttributes: IMetaHierarchyAttributes;
Att: IMetaAttribute;
Begin
Mb := MetabaseClass.Active;
Rubr := MB.ItemById("OBJ_FC").Bind As IRubricator;
Facts := Rubr.Facts;
Hierarchy := Facts.DefaultHierarchy;
HAttributes := Hierarchy.Attributes;
For i := 0 To HAttributes.Count - 1 Do
Att := HAttributes.Item(i);
Debug.WriteLine(Attribute + i.ToString + : + Att.Name);
Debug.WriteLine(Level: + HAttributes.Level(Att).Name);
End For;
End Sub Main;
After executing the example the information about attributes of the current hierarchy of time series database is displayed in the console window.
See also: