LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto: Make Current Values Default in code

I see what you want now! Unfortunately LabVIEW doesn't do everything for you...i guess there wouldn't be any need for us then would there! Maybe NI will think about this problem for the next version?

I think your 'saving current valves to file' approach is probably the best and simplest way round it, and doesn't really take that much code i am sure. The main drawback i can see is having to lag round a config file. There has been a good alternative suggested by Mache, but i think this will require even more coding, but no config file. So in the end, you have to decide...do you want to lag around a config file, or do you want to lag around a bit more code?

Kim
0 Kudos
Message 11 of 14
(1,120 Views)
Hi Leif,

The "Run Save Defaults.vi" attached by me earlier is like a function. You drop this Vi in your Main VI and then wire the Path Information of the Main Vi to it. Make Sure you do this at the very end of your Main VI. You can use "This Vis Path" Fuction to do this. Now when your Main VI exits. The "Run Save Defaults.vi" takes over Saves defaults and exits.

The Best Part is you can customize these Vis the Way you Like.

For that Matter Even Win OS and Many other Programs Save user Chosen setting values in INI or REGISTRY files. That Method is reliable and rugged. The Registry Read and Write Methods are Faster than any file I/O. The OS gives these operation the top priority. So These are your Options to Choose. Believe me its not the prove
rbial "Devil's Alternative".

Regards,

Mache
Good Luck!

Mache
0 Kudos
Message 12 of 14
(1,120 Views)
See my answer above. It describes what you want. I have an example
that demonstrates this technique. Let me know if you want it and I
will e-mail it to you.
0 Kudos
Message 13 of 14
(1,120 Views)
Did you know that LabVIEW lets you create, write and read registry
keys. You could create/write registry keys to keep your configuration
information in at the end of execution and read it back when you start
the next execution. That is the solution that you are looking for.

Doug De Clue
LabVIEW developer
ddeclue@bellsouth.net


storeyk wrote in message news:<50650000000500000006920000-1027480788000@exchange.ni.com>...
> I see what you want now! Unfortunately LabVIEW doesn't do everything
> for you...i guess there wouldn't be any need for us then would there!
> Maybe NI will think about this problem for the next version?
>
> I think your 'saving current valves to file' approach is probably the
> best and simplest wa
y round it, and doesn't really take that much code
> i am sure. The main drawback i can see is having to lag round a
> config file. There has been a good alternative suggested by Mache,
> but i think this will require even more coding, but no config file.
> So in the end, you have to decide...do you want to lag around a config
> file, or do you want to lag around a bit more code?
>
> Kim
0 Kudos
Message 14 of 14
(1,120 Views)