IMetabaseObjectCopyInfo.Destination

Syntax

Destination: IMetabaseObjectDescriptor;

Destination: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

Description

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

Comments

The following objects can be set as an object-container: MDM repository, Time series database, Modeling container, Assembly, .NET 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 calling the IMetabase.CopyObject method the Destination property will contain description of the obtained object copy.

Example

Executing the example requires that the repository contains an object with the OBJTEST identifier and a dictionary 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;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    MB := Params.Metabase;
    CInfo := MB.CreateCopyInfo();
    CInfo.Id := MB.GenerateId("OBJTEST"0);
    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;

After executing this 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