Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
If CommandName = "ERASE" Then
ThisDrawing.SendCommand "undo" & Chr(13) & Chr(13)
End If
End Sub
Private Sub AcadDocument_ObjectErased(ByVal ObjectID As Long)
Dim ent As AcadEntity
Set ent = ThisDrawing.ObjectIdToObject(ObjectID)
If (ent.ObjectName = "AcDBText") Or (ent.ObjectName = "AcDBLine") Then
MsgBox "您刚才删除的是" & ent.ObjectName
End If
End Sub