How can I query the faces that highlight when I pick a feature?

EvanReese
EvanReese Member, Mentor Posts: 3,099 PRO

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
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com

Answers

  • Caden_Armstrong
    Caden_Armstrong Member Posts: 472 PRO

    You could use lastModifyingOperationId(context, query), against every face. It wouldn't be super efficient, but would work.

    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications
  • EvanReese
    EvanReese Member, Mentor Posts: 3,099 PRO

    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.

    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com