From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set properties programmatically and persist

I have several control arrays that I set the properties for programatically from a file (min, max, label, etc.).  If there was a way to make these values persist after they are set I would only have to do this once instead of every time the app runs.  This would be helpful as there would be one less file to distribute.  Suggestions anyone?

0 Kudos
Message 1 of 3
(3,401 Views)

In my opinioin you are already using the best option for this kind of tasks, i.e. having a configuration or customization file with which to personalize a general-use program to specific application characteristics.

As an alternative you could consider directly personalizing the UIR file with the appropriate set of properties for the controls, but you will need to distribute and maintain custom UIRs instead of having a universal one.



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?
0 Kudos
Message 2 of 3
(3,391 Views)

SetCtrlAttribute (pnl,ctrl , ATTR_DFLT_VALUE, );  I believe this may be of interest for only value.  For colors, sizes etc, if I need control, will  set those programmatically in the beginning of execution in an init(); function if necessary, then assigne those values to variables that I can change thoughout execution as needed. 

0 Kudos
Message 3 of 3
(3,375 Views)