|
我想选取固定层上的对象,可是老是提示说select 作用于对象IAcadSelectionSet时失败,为什么?哪为大侠帮帮忙,先谢了.
Sub selection()
Dim a As AcadSelectionSet
For i = 0 To ThisDrawing.SelectionSets.Count - 1
If (ThisDrawing.SelectionSets.Item(i).name = "给水") Then
ThisDrawing.SelectionSets.Item(i).Delete
Exit For
End If
Next i
Set a = ThisDrawing.SelectionSets.Add("给水")
a.Select acSelectionSetAll, , , 8, "给水"
End Sub |
|