LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Update Default Control Values at Runtime

Hello,

 

I would like to update the default values of my controls (numeric and text boxes) upon exiting the exe. That way when I open up the exe again it has the last control values I used displayed. Is there anyway I could do this without making another file and reading it when I open it again.

 

Thank you.

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

Default values are store inside UIR files and they are not editable at runtime; to be more precise, you can change the default values at runtime calling SetCtrlAttribute with ATTR_DFLT_VALUE attribute, but this change is not saved in the UIR file, so you won't find it updated the next time you run the program.

 

CVI offers SavePanelState and RecallPanelState to save/recall control values but I'm not sure those commands save also default values: you must test it by yourself. Nevertheless, if your goal is to have the last control values displayed at a new program run those controls should do the trick.

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(4,269 Views)