Save user parameter in IDW?

Save user parameter in IDW?

tgregory3G7FA
Advocate Advocate
475 Views
3 Replies
Message 1 of 4

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
476 Views
3 Replies
Replies (3)
Message 2 of 4

Frederick_Law
Mentor
Mentor

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

Message 3 of 4

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
Message 4 of 4

^_^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