IMetaHierarchyInstance.GetRootMembers

Syntax

GetRootMembers: IMetaMembers;

Description

The GetRootMembers method returns root elements of the time series database.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier. This database must have factor hierarchy by the COUNTRY attribute.

Sub Main;

Var

Mb: Imetabase;

Rubr: IMetabaseObject;

RubrInst: IRubricatorInstance;

Facts: IMetaDictionaryInstance;

Hierarchy: IMetaHierarchy;

HInstance: IMetaHierarchyInstance;

Loo: IMetaDictionaryLookup;

Members: IMetaMembers;

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);

Loo := HInstance.Lookup;

Loo.FactorAttribute := "COUNTRY";

Loo.WhereFactorKey := 512;

Members := HInstance.GetRootMembers;

Members.Reset;

While Not Members.Eof Do

Debug.WriteLine(Members.Current.Name);

Members.Next;

End While;

End Sub Main;

After executing the example the names of root elements that meet specified conditions are displayed in the console window.

See also:

IMetaHierarchyInstance