sub main()
Dim ssetObj As AcadSelectionSet Dim ssobj As AcadSelectionSet Dim CONUT As Integer CONUT = 0 Count = ThisDrawing.SelectionSets.Count For i = 0 To Count - 1 '删除所有的选择集 Set ssetObj = ThisDrawing.SelectionSets.Item(0) ssetObj.Delete Next i Dim sjx As AcadSelectionSet Dim FilterType(1) As Integer Dim FilterData(1) As Variant Set sjx = ThisDrawing.SelectionSets.Add("sjx") FilterType(0) = 0 FilterData(0) = "text" '是圆
'FilterType(1) = 62 'FilterData(1) = 10 '颜色是3
FilterType(1) = 8 FilterData(1) = "shuju" '图层是0 Dim mode As Integer mode = acSelectionSetAll sjx.Select mode, , , FilterType, FilterData
Dim entry As AcadEntity
Dim point As Variant
For Each entry In sjx
point = entry.InsertionPoint
msgbox point(0)
......
next entry
end sub
|