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.
How can I query the faces that highlight when I pick a feature?
EvanReese
Member, Mentor Posts: 2,186 ✭✭✭✭✭
qCreatedyBy() works for things like Extrude and Revolve because those are creating geometry. It doesn't work for things like Move Face and External Thread because those only modify existing geometry. However if I click on a Move Face or External Thread feature in a Part Studio it highlights the relevant faces. Is there a way to query those highlighted faces?
Evan Reese
1
Answers
You could use lastModifyingOperationId(context, query), against every face. It wouldn't be super efficient, but would work.
Custom FeatureScript and Onshape Integrated Applications
Thanks once again, Caden! I've not given it a test yet, but wouldn't this only get the most recent one? I'm trying to have a FeatureList param and query the faces for those features. I was hoping to have a "Features" mode in my recently released Thread Decal feature.