LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Control Default

I thought there was such a method, but when I looked for it, I didn't find it ...  I agree that it is otherwise "major overkill" ...  At least my Post got you to post a "better solution" ...

 

BS

0 Kudos
Message 11 of 14
(1,492 Views)

@Bob_Schor wrote:

At least my Post got you to post a "better solution" ...


But the "best" solution is to enable scripting and then use the Default Value property and shown in the second message of this thread.  I just tested it and the read does work in an executable.


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 12 of 14
(1,473 Views)

Both solutions look good.

 

Read Control,  Reinit To default, read control, restore from 1st read.

Is 3 steps from being simple, but much better than Reinit All.

 

Scripting DefVal

It appears simple but needs suporting steps, open ref, close ref.

Under the hood coding is likely larger and slower.

 

BTW: I took a quick look at the scripting tutorials, but they all open with NewVI. Crossrulz do you have a larger snippet?

 

 

0 Kudos
Message 13 of 14
(1,407 Views)

Pappion wrote: Crossrulz do you have a larger snippet?

What I gave you already is all you need.  It is an explicit reference to the control, so no need to open or close references.  And I did test it in an executable and READING of the default property works.  You just can't WRITE to the property.  Just dig into the options dialog in the VI Server catagory and enable scripting and you can access the property.


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
0 Kudos
Message 14 of 14
(1,393 Views)