我写了一下,
如下
Public Sub main()
Dim sset As AcadSelectionSets
Dim ss As AcadSelectionSet
Set sset = ThisDrawing.SelectionSets
If sset.Count > 0 Then
For i = 0 To sset.Count - 1
If UCase(sset.Item(i).Name) = "STARCRAFT" Then
sset.Item(i).Clear
sset.Item(i).Delete
End If
Next i
End If
Set ss = sset.Add("starcraft")
ss.Select acSelectionSetAll
ReDim total(0 To ss.Count - 1) As Object
sscount = ss.Count
For i = 0 To ss.Count - 1
Set total(i) = ss.Item(i)
totalobjtype(i) = ss.Item(i).n
Next i
'在这里设置一个断点,然后在监视窗口中看
'total的值,其属性中不能获得图元名,甚至
'类型我也没有能访问,只能在监视创口的上面看
End Sub