Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

query any of a long list of entity/geometry types

adamohernadamohern Member, OS Professional Posts: 216 PRO
I would like my input query to allow the user to select a face, plane, edge, or sketch entity. How do I allow all of these at once?

I've noticed that the bitwise OR operator "||" works if you use two only two criteria, but breaks down if you try to do more than two.

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Hmm. The following works fine for me:
    annotation { "Name" : "My Query", "Filter" : GeometryType.LINE || GeometryType.PLANE || SketchObject.YES, "MaxNumberOfPicks" : 1 }
    definition.parameter is Query;
    Would you mind posting an example of the || operator failing, for the sake of trying to reproduce the bug?
  • adamohernadamohern Member, OS Professional Posts: 216 PRO
    Good to know. Not sure what I was doing wrong. Rather than try to reproduce whatever problem I was having I'll just try to move forward and see if I can get it to work. Thanks!
Sign In or Register to comment.