Object: IMetabaseObjectDescriptor;
The Object property determines the object descriptor, that needs removing when updating.
The object, that needs removing when updating, can also be assigned by its key or identifier. Use the corresponding properties: IMetabaseUpdateDeleteObjectNode.ObjectKey or IMetabaseUpdateDeleteObjectNode.ObjectId.
Executing the example requires the update file C:\Update.pefx. The repository should contain an object with the OBJ_FOR_PEF identifier. Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UFN: IMetabaseUpdateFolderNode;
UpdateObj: IMetabaseUpdateDeleteObjectNode;
Begin
MB := MetabaseClass.Active;
Update := Mb.CreateUpdate;
Update.LoadFromFileNF("C:\Update.pefx");
UFN := Update.RootFolder;
UpdateObj := UFN.Add(MetabaseUpdateNodeType.DeleteObject) As IMetabaseUpdateDeleteObjectNode;
UpdateObj.Object := MB.ItemById("OBJ_FOR_PEF");
UpdateObj.Label := "Object removing OBJ_FOR_PEF";
Update.SaveToFileNF("C:\Update.pefx");
End Sub UserProc;
After executing the example the OBJ_FOR_PEF object removal is added to the C:\Update.pefx update structure. Changes in the update are saved.
See also: