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.


PSA - New FeatureScript UI Options

Alex_KempenAlex_Kempen Member Posts: 244 EDU
Onshape recently updated the UI precondition parser, which unlocked some new options for specifying UI. Since it seems these changes didn't make it into the changelog, I figured I'd make a post highlighting some of the new additions:
  • Group parameters can now be driven by Quantity parameters. This results in the group drop down being placed inline to the left of the quantity parameter. See the new hole feature for an example.
  • Bracket map access is now supported for parameter names (e.g. `definition["myField"] is Query;`). This means it is finally possible to create parameters named `type` (using `definition["type"]`) and to use global variables to define parameter names, including user facing names. I haven't tested this with every annotation option, but this also works with some string like annotation fields, including fields like Name (but not UIHint).
  • UI predicates can now take additional arguments (beyond definition) and use said arguments to modify the parameters they create. This makes it possible to, for example, create predicates which prepend arbitrary strings to the names of the parameters they define, which is very handy for creating groups of parameters which are variants of each other without having to copy-paste. For an example, see the new defineTolerance functions in the std.
CS Student at UT Dallas
Check out my FeatureScripts here:


Sign In or Register to comment.