Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
SELECTING FROM THE FEATURE TREE
papawo
Member, Developers Posts: 206 PRO
Is it possible to select a derived feature in the feature tree without user selecting it?
Tagged:
0
Best Answer
-
kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565Generally, FS features are not aware of feature history, only the geometry those features created, so the technical answer is no. Geometric queries and evaluations are much more robust to different user workflows, and much more transparent to the end user.
If you don't intend for your feature to be used in a Part Studio with irrelevant geometry, you can simply query for all geometry that said feature will have created, e.g.const existingParts = qBodyType(qEverything(EntityType.BODY), BodyType.SOLID); const existingSurfaces = qBodyType(qConstructionFilter(qEverything(EntityType.BODY), ConstructionObject.NO), BodyType.SHEET); // Includes sketches but not default planes
Example public document:
https://cad.onshape.com/documents/e6433319c2c98d0b3a626d2e/w/0ee72fb2d01d12fb528fc5dc/e/5e2118be1685dd7db34e8d93
1
Answers
If you don't intend for your feature to be used in a Part Studio with irrelevant geometry, you can simply query for all geometry that said feature will have created, e.g.
https://cad.onshape.com/documents/e6433319c2c98d0b3a626d2e/w/0ee72fb2d01d12fb528fc5dc/e/5e2118be1685dd7db34e8d93