Message 1 of 3
Filtered On Screen Selection

Not applicable
08-08-2002
02:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am in the process of learning Visual Basic. In the small routine below I want to select, on screen, all objects desired except paperspace viewports. However, it does not work. Specifically, it says the arguments for "SelectOnScreen" are incorrect. What am I doing wrong?
Sub SelectOS()
Dim ss1 As AcadSelectionSet
Set ss1 = ThisDrawing.SelectionSets.Add("sset")
Dim FilterType(1) As Integer
Dim FilterData(1) As Variant
FilterType(0) = -4
FilterData(0) = "!="
FilterType(1) = 0
FilterData(1) = "PViewport"
ss1.SelectOnScreen FilterType, FilterData
End Sub
Sub SelectOS()
Dim ss1 As AcadSelectionSet
Set ss1 = ThisDrawing.SelectionSets.Add("sset")
Dim FilterType(1) As Integer
Dim FilterData(1) As Variant
FilterType(0) = -4
FilterData(0) = "!="
FilterType(1) = 0
FilterData(1) = "PViewport"
ss1.SelectOnScreen FilterType, FilterData
End Sub