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.

Either or selection of edge or face in featurescript

CAD_SSPCAD_SSP Member Posts: 45 ✭✭
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

  • CAD_SSPCAD_SSP Member Posts: 45 ✭✭
    edited December 2017 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:
    <div>annotation { "Name" : "Measure From", "Filter" : (EntityType.EDGE || EntityType.FACE), "MaxNumberOfPicks" : 1 }
    </div>
    For full details of other options check out the fillet feature in the source documentation.


Answers

  • owen_sparksowen_sparks Member, Developers Posts: 2,660 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.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • CAD_SSPCAD_SSP Member Posts: 45 ✭✭
    edited December 2017 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:
    <div>annotation { "Name" : "Measure From", "Filter" : (EntityType.EDGE || EntityType.FACE), "MaxNumberOfPicks" : 1 }
    </div>
    For full details of other options check out the fillet feature in the source documentation.


Sign In or Register to comment.