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.

Annotation filters - what should I expect to work?

traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
So, to grab wires in a sketch, shouldn't the following work?
annotation { "Name" : "Sketch Edges", "Filter" : EntityType.EDGE && BodyType.WIRE   }
If I'm filtering from everything, why does this not work?
annotation { "Name" : "Sketch Edges", "Filter" : BodyType.SOLID}

Tagged:

Comments

  • EvanEvan Onshape Employees Posts: 62
    Thanks for the feedback.  You are correct. This filter:
    annotation { "Name" : "Sketch Edges", "Filter" : EntityType.EDGE && BodyType.WIRE }
    should include sketch edges.  (It would also include helices, which are wire bodies.)  I've logged this as an issue.

    You could use a more specific filter that just includes sketch edges:
    annotation { "Name" : "Sketch Edges", "Filter" : EntityType.EDGE && SketchObject.YES }

    With regards to this filter:
    annotation { "Name" : "Sketch Edges", "Filter" : BodyType.SOLID }
    I would expect that to allow selection of any entity (face, edge, vertex) that belongs to a solid body (i.e., a part). What are you expecting in this case?
  • traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
    Regarding
    annotation { "Name" : "Sketch Edges", "Filter" : BodyType.SOLID <span>}</span>
    I was expecting something different (select only parts) but I'm still learning what entities and bodies are and how your query system works..

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,210
    For that, you would need to do EntityType.BODY && BodyType.SOLID
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.