CreateCopyInfo: IMetabaseObjectCopyInfo;
The CreateCopyInfo method enables creating an object to copy by certain parameters.
The copying is executed by the IMetabase.CopyObject method.
Executing the example requires an object with the OBJTEST identifier.
Sub Main;
Var
MB: IMetabase;
CInfo: IMetabaseObjectCopyInfo;
Begin
MB := MetabaseClass.Active;
CInfo := MB.CreateCopyInfo;
CInfo.Id := "OBJTEST_Copy";
CInfo.Name := "Copy of the object OBJTEST";
CInfo.WithData := True;
CInfo.Destination := MB.Root;
CInfo.Source := MB.ItemById("OBJTEST");
MB.CopyObject(CInfo);
End Sub Main;
After executing this example the object with the OBJTEST identifier is copied in a repository root. A new object will be named as Copy Of The Object OBJTEST, identifier OBJTEST_Copy and will save data of a copied object.
See also: