IMetaHierarchyInstance.Lookup

Syntax

Lookup: IMetaDictionaryLookup;

Description

The Lookup property returns the object that determines the condition of element selection.

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