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
-
Generally, 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
-
Generally, 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 -
Thanks Kevin.0

