IMetaHierarchyInstance.GetTree

Syntax

GetTree(Position: IMetaHierarchyPosition): IMetaMembersTree;

Parameters

Position. Position of elements in hierarchy.

Description

The GetTree method returns hierarchy of the time series database elements that are located in the specified position.

Example

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;

RootPosition: IMetaHierarchyPosition;

Tree: IMetaMembersTree;

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

RootPosition := HInstance.RootPosition;

Tree := HInstance.GetTree(RootPosition);

End Sub Main;

After executing the example the Tree variable contains root elements in the factor dictionary hierarchy.

See also:

IMetaHierarchyInstance