Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make an Addin command input value persistent

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
ed.sells
316 Views, 4 Replies

How to make an Addin command input value persistent

Hi!

I understand from the docs that input values are lost (and returned to default) when the add-in is stopped (or, app is closed).

I want to make the input value of an editable string in my command dialogue persistent (it holds the name of an IP address which I want the user to only have to update once).

What is best practice to achieve a persistent value (which does not rely on default value).

Many thanks,

Ed

4 REPLIES 4
Message 2 of 5
marshaltu
in reply to: ed.sells

Hello,

 

You can probably persist your settings to a file and load them when command is invoked next time. 

 

Please note the setting file should be placed into the folder which end users have permission to access.

 

Thanks,

Marshal



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 5
ed.sells
in reply to: marshaltu

Thanks Marshal,

That's fine.

I'd like to save the file somewhere within the Fusion filesystem, to stay tidy, but am cautious since I don't know what gets overwritten/replaced during an update.

Is there a safe directory that springs to mind (which also satisfies permissions as you say)?

Or perhaps this is easier answered with an indication as to what gets overwritten in the case of an update (are there any docs on this?).

Best,

Ed

Message 4 of 5
marshaltu
in reply to: ed.sells

Hello,

 

There is no guideline from Fusion 360 itself. However you can probably check documents from Microsoft and Apple for OS-wide guideline. What I can tell is Fusion 360 uses "%appdata%Autodesk" in Windows and "~/Library/Application Support/Autodesk" in MAC to persist users' options.

 

Thanks,

Marshal 



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 5 of 5
ed.sells
in reply to: marshaltu

Awesome, thanks Marshal

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report