Setting multiple filters

NickBrege
Enthusiast
Enthusiast

Setting multiple filters

NickBrege
Enthusiast
Enthusiast

I'm trying to to set filters for circles & lines in model space, but it's not selecting either.  Can anyone see what I'm doing wrong?  Thanks...

 

        Dim ssName As String
        Dim FilterType(2) As Int16
        Dim FilterData(2) As Object
        Dim objSS As AcadSelectionSet = Nothing

        ssName = "MySet"
        FilterType(0) = 0
        FilterData(0) = "Circle"
        FilterType(1) = 0
        FilterData(1) = "Line"
        FilterType(2) = 67
        FilterData(2) = "0"

        objSS = acadDoc.SelectionSets.Add(ssName)
        objSS.Clear()

        objSS.SelectOnScreen(FilterType, FilterData)
        objSS.Highlight(True)

 

0 Likes
Reply
Accepted solutions (1)
233 Views
2 Replies
Replies (2)

ed57gmc
Mentor
Mentor
Accepted solution

If you just enter it like that, it's equal to AND'ing everything. An entity can't be a circle and a line at the same time. You need to use conditional filtering. Like:

Or

  circle

  line

/or

And

 layer = 0

 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes

NickBrege
Enthusiast
Enthusiast

Thanks, I got it working...

 

0 Likes