Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape, CAD, maker project and design.

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.

Either or selection of edge or face in featurescript

keith_marshkeith_marsh Member Posts: 3
Sure I am missing something really obvious here but I cant see how to allow selection of either a face or an edge in featurescript.

Best Answer

  • keith_marshkeith_marsh Member Posts: 3
    edited December 5 Accepted Answer
    Found it thanks to the OnShape features being open source...

    It is as simple as OR in JavaScript - you add brackets and 2 pipes such as:
    annotation { "Name" : "Measure From", "Filter" : (EntityType.EDGE || EntityType.FACE), "MaxNumberOfPicks" : 1 }
    
    For full details of other options check out the fillet feature in the source documentation.


Answers

  • owen_sparksowen_sparks Member, Developers, Configurations EVP, Standard content EVP Posts: 976 PRO
    Are you talking from the initial user's inputs?

    I might be wrong but I believe you can say filter type face and edge, selection qty 1

    Owen S.
    Production Engineer
    HWM-Water Ltd
  • keith_marshkeith_marsh Member Posts: 3
    edited December 5 Accepted Answer
    Found it thanks to the OnShape features being open source...

    It is as simple as OR in JavaScript - you add brackets and 2 pipes such as:
    annotation { "Name" : "Measure From", "Filter" : (EntityType.EDGE || EntityType.FACE), "MaxNumberOfPicks" : 1 }
    
    For full details of other options check out the fillet feature in the source documentation.


Sign In or Register to comment.