可以:
Sub Example_Select() ' Create the selection set Dim ssetObj As AcadSelectionSet Set ssetObj = ThisDrawing.SelectionSets.Add("SSET1") ' Add all the Circles to the selection set that lie within the crossing of (28,17,0) and ' (-3.3, -3.6,0) by filtering from the current drawing Dim gpCode(0 To 1) As Integer Dim dataValue(0 To 1) As Variant gpCode(0) = -4 dataValue(0) = "<>"
gpCode(1) = 39 dataValue(1) = 0#
Dim groupCode As Variant, dataCode As Variant groupCode = gpCode dataCode = dataValue ssetObj.Select acSelectionSetAll, , , groupCode, dataCode MsgBox ssetObj.Count ssetObj.Delete End Sub
|