IMetabase.DeleteObject

Syntax

DeleteObject(Key: Integer);

Parameters

Key. Key of the object that is being deleted.

Description

The DeleteObject method deletes an object, which key is passed by the Key input parameter.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB : IMetabase;
    ObjKey: Integer;
Begin
    MB := MetabaseClass.Active;
    ObjKey := MB.GetObjectKeyById(
"TestObj");
    
If ObjKey <> -1 Then
        MB.DeleteObject(ObjKey);
    
End If;
End Sub UserProc;

After executing the example if there is an object with the TestObj identifier in the repository, it is deleted.

See also:

IMetabase