有关选择集
我想选取固定层上的对象,可是老是提示说select 作用于对象IAcadSelectionSet时失败,为什么?哪为大侠帮帮忙,先谢了.Sub selection()<BR> Dim a As AcadSelectionSet<BR> For i = 0 To ThisDrawing.SelectionSets.Count - 1<BR> If (ThisDrawing.SelectionSets.Item(i).name = "给水") Then<BR> ThisDrawing.SelectionSets.Item(i).Delete<BR> Exit For<BR> End If<BR> Next i<BR> <BR> Set a = ThisDrawing.SelectionSets.Add("给水")<BR> a.Select acSelectionSetAll, , , 8, "给水"<BR>End Sub 在本论坛搜索“安全创建选择集”,已多次讨论过。 多谢版主 Sub selection()<BR> Dim a As AcadSelectionSet<BR> Dim FilterType(0) As Integer<BR> Dim FilterData(0) As Variant<BR> <BR> FilterType(0) = 8<BR> FilterData(0) = "给水"<BR> <BR> Set a = ThisDrawing.SelectionSets.Add("给水")<BR> <BR> a.Select acSelectionSetAll, , , FilterType, FilterData<BR> a.Delete<BR>End Sub
页:
[1]