Show contents 

Metabase > Metabase Assembly Interfaces > IMetabaseObjectDescriptor > IMetabaseObjectDescriptor.MoveTo

IMetabaseObjectDescriptor.MoveTo

Syntax

MoveTo(Dest: IMetabaseObjectDescriptor);

Parameters

Dest. Repository object, to which the object should be copied.

Description

The MoveTo method moves one repository object into another.

Comments

The destination object should be a non-leaf repository element.

Example

In the repository add two folders with the FOLDER1 and FOLDER2 identifiers.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    MObj2: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById(
"FOLDER1"As IMetabaseObjectDescriptor;
    MObj2 := MB.ItemById(
"FOLDER2"As IMetabaseObjectDescriptor;
    MObj.MoveTo(MObj2);
End Sub UserProc;

After executing the example the FOLDER1 folder is moved to the FOLDER2 folder.

See also:

IMetabaseObjectDescriptor