IMetabase.MoveObject

Syntax

MoveObject(Info: IMetabaseObjectCopyInfo);

MoveObject(Info: Prognoz.Platform.Interop.Metabase.IMetabaseObjectCopyInfo);

Parameters

Info. Information to execute object moving.

Description

The MoveObject method moves the specified object to the specified place.

Example

Executing the example requires that the repository contains an object with the TestObj identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    MB := MetabaseClass.Active;
    CInfo := MB.CreateCopyInfo;
    CInfo.Destination := MB.Root;
    CInfo.Source := MB.ItemById("TestObj");
    MB.MoveObject(CInfo);
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    MB := Params.Metabase;
    CInfo := MB.CreateCopyInfo();
    CInfo.Destination := MB.Root;
    CInfo.Source := MB.ItemById["TestObj"];
    MB.MoveObject(CInfo);
End Sub;

After executing the example an object with the TestObj identifier is moved to the root.

See also:

IMetabase