GetPathMember(Path: String): IMetaMember;
Path. Hierarchy element path.
The GetPathMember method returns the hierarchy element by path.
The element path is its index in hierarchy. Indexation is continuous, starts with zero and holds within one level of hierarchy.
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(Null) As 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: