Attributes: IMetaAttributesSet;
The Attributes property returns attributes set of a hierarchy element.
Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.
Sub Main;
Var
Mb: Imetabase;
Rubr: IMetabaseObject;
RubrInst: IRubricatorInstance;
Facts: IMetaDictionaryInstance;
Hierarchy: IMetaHierarchy;
HInstance: IMetaHierarchyInstance;
Members: IMetaMembers;
Mem: IMetaMember;
i: Integer;
Begin
Mb := MetabaseClass.Active;
Rubr := MB.ItemById("OBJ_FC").Edit;
RubrInst := Rubr.Open(Null) As IRubricatorInstance;
Facts := RubrInst.GetDictionary(RubricatorDictionary.Facts);
Hierarchy := Facts.Dictionary.DefaultHierarchy;
HInstance := Facts.OpenHierarchy(Hierarchy);
Members := HInstance.GetRootMembers;
Members.Reset;
While Not Members.Eof Do
Mem := Members.Current;
Debug.WriteLine(Element: + Mem.Name);
For i := 0 To Mem.Attributes.Count - 1 Do
Debug.WriteLine(Attribute: + Mem.Attributes.Item(i).Name);
End For;
Members.Next;
Debug.WriteLine("----");
End While;
End Sub Main;
After executing the example hierarchy root elements and their attributes are displayed in the console window.
See also: