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.

Featurescript Custom Tables

Hugh_GoodbodyHugh_Goodbody Member Posts: 40 PRO
I have a query (definition.selParts) of solid bodies from a user input annotation, I am trying to get the properties of the parts in this query into a custom table, however the following doesnt work:
for (var part in evaluateQuery(context, definition.selparts ))
How can I access the parts in that query?

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    Is the query in a custom feature or are you trying to add the query into the table precondition (which is not allowed)? Tables execute after the Part Studio has regenerated so the only way to find selected parts from a custom feature is to setAttributes on those parts in the feature, then query for parts with those attributes in the table code.
    Senior Director, Technical Services, EMEAI
  • Hugh_GoodbodyHugh_Goodbody Member Posts: 40 PRO
    Thanks for the insight Neil. Will give it a go.
Sign In or Register to comment.