05-30-2013 06:20 AM
Hi
I attached a vi. In that we have 1 string control & 2 buttons. If i type some data in string control box & press OK means, it should change the default value. Please tell me how to do this one.
If i close vi & open once again, and press the Retrive Button i should retive the last data entered in string box.
Thanks & Regards,
Harish. G.
05-30-2013 06:28 AM
Hi!
You can take a look here:
https://decibel.ni.com/content/docs/DOC-16760
(It's not, stricty speaking, about changing the dafault value programmatically... but should help you anyhow)
Regards,
Marco
05-30-2013 08:31 AM
You can never set any control's (or indicator's) current value to default, if the VI containing it isn't in 'Edit mode'.
Programmatically you can set current to default using an invoke node...!! but again the VI should be opened in 'Edit mode'.
Now the only workaround is, whenever you want to set the current values to default.. write it to a file and then next time, populate the controls/indicators with the value stored in the file.