LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the default value of system checkbox control

Hi

 

I am using a system checkbox on my frontpanel and I would like to know how I can set the default value of this control programmatically.

I have in mind for the user to tick or untick the control during run time and that the next time the program starts it 'remembers/reads' the last setting the user used. I can of course write it to a file but I imagine that it would be easier to set the default value of the control but I can not seem to find how to do so. Am I missing something?

 

Many thanks for your time and suggestions!

 

Jack

0 Kudos
Message 1 of 6
(3,541 Views)

Yes, you're missing something.

 

The default value is included in your executable.

Thus the executable has to modify itself to store the "new" default value.

 

Best regards,

 

Balze

Message 2 of 6
(3,533 Views)

Hi

 

Thanks for the quick reply Balze. Thought I was overlooking something...then again I would have thought it useful for a VI or exe to have a 'log' included within itself that could be used to 'read' and store the last 'preferences' that a user wanted to set/remember for next time (ie select with a property node or similar') rather then writing and reading in a separate log file?

 

Thanks again and interested to hear further suggestions and work-arounds. 

 

Jack

 

 

0 Kudos
Message 3 of 6
(3,525 Views)

For things like this, you usually use an ini file and when you exit the program, you write the current value to that tag in the ini file. Then next time you run it, you read that tag and set the controls value

0 Kudos
Message 4 of 6
(3,515 Views)

 


@for(imstuck) wrote:

For things like this, you usually use an ini file and when you exit the program, you write the current value to that tag in the ini file. Then next time you run it, you read that tag and set the controls value


Nothing to add !

 

0 Kudos
Message 5 of 6
(3,507 Views)

Take a look at this thread.

=====================
LabVIEW 2012


0 Kudos
Message 6 of 6
(3,490 Views)