IMetaMember.Element

Syntax

Element(Index: Integer) Integer;

Parameters

Index - element index.

Description

The Element property returns number of hierarchy element.

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;

Members: IMetaMembers;

Mem: IMetaMember;

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

Debug.WriteLine(Number + Mem.Element(0).ToString);

Members.Next;

Debug.WriteLine("----");

End While;

End Sub Main;

After executing the example hierarchy root elements and their numbers are displayed in the console window.

See also:

IMetaMember