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.
access variable context of another feature
adamohern
Member, OS Professional Posts: 216 PRO
I'm using a FeatureList parameter to select a previously-created feature. Is it possible to look into that feature's context to access its definition variables and/or internal feature id's within the feature?
0
Comments
You can also attach data to entities as attributes.
For your case, I'd probably use setVariable and getVariable using the featureId to store the relevant data.
Note the isTopLevelId check. If any variable-setting features get patterned, they'll have nested ids which fail the check, and also won't be selectable via feature pattern.