- Private Sub CommandButton1_Click()
- Dim sset As AcadSelectionSet
-
- On Error Resume Next
- ThisDrawing.SelectionSets("dxd").Delete
- Set sset = ThisDrawing.SelectionSets.Add("dxd")
- On Error GoTo 0
-
- Dim FilterType(0 To 3) As Integer
- Dim FilterData(0 To 3) As Variant
- '设置过滤器类型
- FilterType(0) = -4
- FilterType(1) = 0
- FilterType(2) = 0
- FilterType(3) = -4
- '设置过滤数据
- FilterData(0) = "<or"
- FilterData(1) = "LWPolyline"
- FilterData(2) = "line"
- FilterData(3) = "or>"
-
- Me.hide
-
- '添加至选择集中,在选择过程中进行过滤
- sset.SelectOnScreen FilterType, FilterData
- MsgBox "sset.Count=" & sset.Count
-
- Me.Show
- End Sub
|