Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Referencing variables or parameters in component descriptions

Anonymous

Referencing variables or parameters in component descriptions

Anonymous
Not applicable

Hello!

 

I am sorry in advance if this has been asked before, I feel like I'm at a dead end at this point. So I have a number of similar designs which are primarily composed of tubing components. I would like to generate a parts list which references some parameters I set like material thickness and length. I knew that the components description in the model space shows up in the drawing space when a parts list is generated under "description", and was wondering if I can reference variables or parameters in the model space description so that changes to the components won't require manual re-entry. I suspect that the description can handle expressions because when you start a string with equals "=", the parsed description shows up in the drawing space as octothorpes "####". Is there a syntax I'm missing, or is it even possible at this stage?

 

Thank you in advance for your time!

0 Likes
Reply
Accepted solutions (1)
1,572 Views
2 Replies
Replies (2)

p.seem
Advocate
Advocate
Accepted solution

mccallk,

 

I don't know of any way to input user parameters directly into the component description from within the UI (e.g. by typing variable names into the description box), but as you're in the API forum, I can confirm that you could definitely do it through a script!

 

You can get/set the component's description with the description property.

And you can access user parameters as described by Brian in this old post.

 

Unfortunately that link wouldn't be live, so you'd need to rerun the script whenever you wanted the description to be updated (e.g. just before editing your drawing).  I don't know of any way around that, I'm afraid.

 

I hope that helps.

 

 

1 Like

Anonymous
Not applicable

I thought it may be something like that, thank you!

0 Likes