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

Save user parameter in IDW?

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?

 

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

WCrihfield
in reply to: tgregory3G7FA

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)

^_^clovis^_^
in reply to: WCrihfield

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.