IMetabaseObjectCopyInfo.Assign

Syntax

Assign: Boolean;

Description

The Assign property determines whether an object copy along with its data source is created.

Comments

Default property value is False, in this case copying is performed on the base of object description specified in the IMetabaseObjectCopyInfo.Source property. If property value is True, in the IMetabaseObjectCopyInfo.Source property it is necessary to specify a copied object itself, in this case an object copy and copy of its data source along with data are created.

Example

Executing the example requires a modeling container with the KONT_MODEL identifier. Modeling variable with the Var_1 identifier is present in this container.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Kont: IMetabaseObjectDescriptor;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    MB := MetabaseClass.Active;
    Kont := MB.ItemById("KONT_MODEL");
    CInfo := MB.CreateCopyInfo;
    CInfo.Id := "Copy_Var_1";
    CInfo.Name := "Copy of the Var_1 variable";
    CInfo.Destination := Kont;
    CInfo.Source := MB.ItemByIdNamespace("VAR_1", Kont.Key).Bind;
    CInfo.Assign := True;
    MB.CopyObject(CInfo);
End Sub UserProc;

After executing the example a copy of the VAR_1 variable is created in the modeling container. Also, on copying a copy of automatic cube on which the variable is based is created.

See also:

IMetabaseObjectCopyInfo