- Dim ss As AcadSelectionSet
- Set ss = CreatSSet
- Dim FilterType As Variant
- Dim FilterData As Variant
- Dim FType(1) As Integer
- Dim FData(1) As Variant
- FType(0) = 0
- FData(0) = "INSERT" '图元名
- FType(1) = 2
- FData(1) = "B-BTL" '图块名
- FilterType = FType
- FilterData = FData
- ss.Select acSelectionSetAll, , , FilterType, FilterData
以下是用到的创建空白选择集的函数:- Function CreatSSet() As AcadSelectionSet
- On Error Resume Next
- ThisDrawing.SelectionSets("mccad").Delete
- Set CreatSSet = ThisDrawing.SelectionSets.Add("mccad")
- End Function
|