IMetabaseObjectCopyInfo.Destination

Syntax

Destination: IMetabaseObjectDescriptor;

Description

The Destination property determines a container object, to which copying or moving is executed.

Comments

The following objects can be set as container objects: MDM repository, time series database, modeling container, assembly. Any custom class object can also be a container object. In this case a copied or moved object will become an internal object (it will not be shown in the object navigator) relative to the specified custom class object.

NOTE. Check if a specific class can be copied or moved under the object in the application code.

After the IMetabase.CopyObject method call the obtained object copy is contained in the Destination property.

Example

Executing the example requires that the repository contains an object with the OBJTEST identifier and a folder with the F_COPY identifier.

Add a link to the Metabase system assembly.

Sub CopyObject;
Var
    MB: IMetabase;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    MB := MetabaseClass.Active;
    CInfo := MB.CreateCopyInfo;
    CInfo.Id := MB.GenerateId("OBJTEST");
    CInfo.Name := "Copy of the OBJTEST object";
    CInfo.WithData := True;
    CInfo.Destination := MB.ItemById("F_COPY");
    CInfo.Source := MB.ItemById("OBJTEST");
    MB.CopyObject(CInfo);
End Sub CopyObject;

After executing the example the object with the OBJTEST identifier is copied to the specified repository folder. A new object will be named Copy of the OBJTEST Object, identifier will be generated automatically. The object will be copied with data.

See also:

IMetabaseObjectCopyInfo