IMetabaseObjectCopyInfo.Destination

Syntax

Destination: IMetabaseObjectDescriptor;

Description

The Destination property determines object-container in that copying or moving is performed.

Comments

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

NOTE. Check if it is possible to copy or move under the particular class object must be performed in the application code.

After the IMetabase.CopyObject method call a received copy of the object 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 := "The OBJTEST object copy";
    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 OBJTEST Object Copy, identifier will be generated automatically. Object will be copied with data.

See also:

IMetabaseObjectCopyInfo