ObjectErased Event (ActiveX)

Triggered when an object has been erased from the drawing.

Supported platforms: Windows only

Signature

VBA:

object.ObjectErased(ObjectID)
object

Type: Document

An object expression that evaluates to a valid container object. In this case, the only valid container is a document.

ObjectID

Type: LONG_PTR; input to the handler

The object ID of the object that was erased.

Remarks

No events will be fired while a modal dialog is being displayed.

Examples

VBA:

Private Sub AcadDocument_ObjectErased(ByVal ObjectID As Long_PTR)
    ' This example intercepts a drawing ObjectErased event.
    '
    ' This event is triggered when an object is removed from a drawing.
    '
    ' To trigger this example event: Delete (Cut) an existing object from an open drawing

    ' Use the "Object" variable to determine the type of object removed
    MsgBox "The ID of the object deleted is: " & ObjectID

End Sub

Visual LISP:

Not available