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

Save user parameter in IDW?

tgregory3G7FA
Advocate

Save user parameter in IDW?

tgregory3G7FA
Advocate
Advocate

I've created some ilogic using a user entered shared variable.

Which works fine for that session.  But when Inventor is closed, the variable is cleared out.

Is there a way to save a variable in an IDW so that the value is there next time it's opened?

 

0 Likes
Reply
169 Views
3 Replies
Replies (3)

Frederick_Law
Mentor
Mentor

Save the variable to a text file when it change in rule and read it when the rule run.

WCrihfield
Mentor
Mentor

Hi @tgregory3G7FA.  If you really want to save a value within the document, instead of externally, then there are 3 main places to save something like that.  In a UserParameter, in a custom iProperty, or in a document level Attribute.  The iProperty route is likely the quickest and simplest, but it would be visible in the iProperties dialog, on the Custom tab.  The Attribute route would be the most complicated (but not that bad), and would also be the only truly out of sight location, because there is no user interface way to access them (only by code).

oSet = ThisDoc.Document.AttributeSets.Add("SetName")
oAtt = oSet.Add("Name", ValueTypeEnum.kStringType, "Your Value Here")

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

^_^clovis^_^
Advocate
Advocate

save the data in the registry. I do it to assign plotter, pdf , fillet with custom radius, lastOpendrawing. I can use the info in Autocad or Inventor. if the registry doesn't exist I just create it.

0 Likes