IMetaMember.Clone

Syntax

Clone(Parent: IMetaHierarchyPosition): IMetaMember;

Parameters

Parent - position of a hierarchy element.

Description

The Clone method creates a copy of hierarchy element located in a 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;

Members: IMetaMembers;

Mem, MemClone: 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;

Mem := Members.Current;

RootPosition := HInstance.RootPosition;

MemClone := Mem.Clone(RootPosition);

End Sub Main;

After executing the example the MemClone variable contains a copy of a factor dictionary root element.

See also:

IMetaMember