- Private Sub LT_XBlock_Click()
- Me.Hide
- ThisDrawing.Activate
- Dim filtertype(0) As Integer
- Dim filterdata(0) As Variant
- Dim explodedObjects As Variant
- Dim sset As AcadSelectionSet, filterent As AcadBlockReference
- filtertype(0) = 0
- filterdata(0) = "INSERT"
- Set sset = ThisDrawing.SelectionSets.Add("SSETS" & CStr(Now()))
- sset.SelectOnScreen filtertype, filterdata
- If sset.Count < 1 Then
- MsgBox "选取对象为空"
- Exit Sub
- End If
- For Each filterent In sset
- filterent.Explode
- filterent.Delete
- Next
- End Sub
你的图,你的代码,没问题,只是少变量定义,我在1楼就说过 |