LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programitically Reinitialize Specific Front Panel Controls To Default Values

Hi everyone, I know I can re-initialize "all" controls to their default values using an Invoke Mode.  How do I re-initialize only specific controls I want to re-initialize to their default value?  Basically, I want to re-initialize all the controls except for one control.  I want to do this during run-time of the VI.

 

Thanks so much! 

0 Kudos
Message 1 of 5
(2,459 Views)

Right click on the control in the block diagram -> create invoke node -> Reinit to Default.  Repeat for each one you want to do.

 

Alternatively, if you only have one that you don't want to reinit, you could read the value from that, then reinit all, then write the value you read back to the one you don't want to reinit.

CLAD
Message 2 of 5
(2,456 Views)

In your situation, I would probably just reinitialize all and then immediately set the value of that one control.  Your alternative is to use the Reinitialize Value method for each and every control except that one.  You could do this in a FOR loop easily enough.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 5
(2,455 Views)

Crossrulz, how do I know what control reference is the reference to the control I do NOT want to reinitialize?  Thanks!

0 Kudos
Message 4 of 5
(2,448 Views)

You can inspect the caption.text or label.text property and exclude it by its name.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 5
(2,437 Views)