12-08-2015 01:48 AM
i want to change default value of my numeric control permanently when changed by the user , for example my numeric control is displaying 44.555 when my user interface starts. As 44.555 is default value for the numeric control but if i change the value to 45.444 then i want the default value to be 45.444 so that when i load my user interface again then numeric control displays 45.444. in short i want to update the default value of my control when loaded.
i have already studied
http://zone.ni.com/reference/en-XX/help/370051V-01/cvi/uiref/cvinumeric_attributes/
http://zone.ni.com/reference/en-XX/help/370051AC-01/cvi/uiref/cvisetctrlattribute/
12-08-2015 01:56 AM
So let me provide a link to an answer of Roberto on this issue I have not tried this approach myself because I prefer using ini files for saving/reading panel settings and values.
12-08-2015 03:47 AM - edited 12-08-2015 03:51 AM
have read the answer so in short solution not possible as uri is unchangeable in cvi at runtime.
12-21-2015 10:37 AM
You could call SavePanelState each time that you change the control's value at runtime and then also call RecallPanelState immediately after loading your .uir. The main problem with this approach is that it's going to affect all the controls in your panel, not just the one control for which you want to change the default value. If that is a problem for you, you could save the control's value yourself to some arbitrary file and then load it and restore it each time you load the panel from the .uir.
Luis