我想判断删除的内容是不是一条多段线,是则判断是那条,然后进行处理
Private Sub AcadDocument_ObjectErased(ByVal ObjectID As Long) '得到cadid和objectid的 nzdid Dim nzdId As Integer Dim tempObj As AcadObject On Error GoTo ErrorLine Set tempObj = ThisDrawing.ObjectIdToObject(ObjectID) If LCase(tempObj.ObjectName) <> "polylwline" Then Exit Sub End If
'然后对该线进行操作
Exit Sub ErrorLine: MsgBox Err.Description End Sub