GetMembers: IMetaMembers;
The GetMembers property returns hierarchy element children.
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;
Mem: IMetaMember;
MemCh: IMetaMemberChildren;
Members: IMetaMembers;
Begin
Mb := MetabaseClass.Active;
Rubr := MB.ItemById("OBJ_FC").Bind;
RubrInst := Rubr.Open(Null) As IRubricatorInstance;
Facts := RubrInst.GetDictionary(RubricatorDictionary.Facts);
Hierarchy := Facts.Dictionary.DefaultHierarchy;
HInstance := Facts.OpenHierarchy(Hierarchy);
Mem := HInstance.Root;
MemCh := Mem.Children;
If Not MemCh.IsEmpty Then
Members := MemCh.GetMembers;
Members.Reset;
While Not Members.Eof Do
Debug.WriteLine(Members.Current.Name);
Members.Next;
End While;
End If;
End Sub Main;
After executing the example, names of child elements for factors hierarchy node are displayed in the console window.
See also: