IMetaHierarchyInstance.GetPathMember

Syntax

GetPathMember(Path: String): IMetaMember;

Parameters

Path. Hierarchy element path.

Description

The GetPathMember method returns the hierarchy element by path.

Comments

The element path is its index in hierarchy. Indexation is continuous, starts with zero and holds within one level of hierarchy.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
Var
    Mb: Imetabase;
    Rubr: IMetabaseObject;
    RubrInst: IRubricatorInstance;
    Facts: IMetaDictionaryInstance;
    Hierarchy: IMetaHierarchy;
    RootPosition: IMetaHierarchyPosition;
    HInstance: IMetaHierarchyInstance;
    Mem: IMetaMember;
Begin
    Mb := MetabaseClass.Active;
    Rubr := MB.ItemById(
"TSDB").Edit;
    RubrInst := Rubr.Open(
NullAs IRubricatorInstance;
    Facts := RubrInst.GetDictionary(RubricatorDictionary.Facts);
    Hierarchy := Facts.Dictionary.DefaultHierarchy;
    HInstance := Facts.OpenHierarchy(Hierarchy);
    RootPosition := HInstance.RootPosition;
    HInstance.GetMembers(RootPosition);
    Mem := HInstance.GetPathMember(
"0");
    
If Mem <> Null
        
Then Debug.WriteLine(Mem.Name);
        
Else Debug.WriteLine("Element is not found");
    
End If;
End Sub UserProc;

After executing the example the name of the first element of the hierarchy root level is displayed in the console window.

See also:

IMetaHierarchyInstance