LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Save and Load Defaults Between Runs

Is there an easy way to save/load defaults between runs of a VI?

I'd hate to have the users re-input data that doesn't change frequently. Something like "Start with last state", or do I have to write all the defaults to a file, then load them?

 

Thanks

0 Kudos
Message 1 of 4
(2,842 Views)

See here for an example - https://decibel.ni.com/content/docs/DOC-15349


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,841 Views)

 


Travis.Ayres@ngc.com wrote:

Is there an easy way to save/load defaults between runs of a VI?

I'd hate to have the users re-input data that doesn't change frequently. Something like "Start with last state", or do I have to write all the defaults to a file, then load them?

 

Thanks


 

Yes, you have to save the values you want persited to a file and load them during initialize.  Resetting default values for the vi requires it to recompile (so you can't do it in run mode) but there are lots of great configuration utilities and examples in the community.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(2,832 Views)

Here's how I'd do it.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 4
(2,812 Views)