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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear dropdown selection and string box everytime sub vi runs

Solved!
Go to solution

Hi all,

 

Is there a way to clear a string/text box and dropdown menu(enum/ring ) selection every time the subvi which contains these controls runs.

 

Thanks,

0 Kudos
Message 1 of 8
(3,417 Views)

look into the property nodes of those controls and programically clear them outside your loop

0 Kudos
Message 2 of 8
(3,407 Views)

@apok wrote:

look into the property nodes of those controls and programically clear them outside your loop


Hi apok,

 

which method of property node? you meant "Value" , but how to reset the value of these controls?

0 Kudos
Message 3 of 8
(3,403 Views)

Hi Ankit,

 

you can set the desired values as default for those controls, then LabVIEW will handle that "clearing" for you…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,401 Views)

@GerdW wrote:

Hi Ankit,

 

you can set the desired values as default for those controls, then LabVIEW will handle that "clearing" for you…


Hi GerdW,

 

Thats the problem , I have a subVi with these controls in my main Vi, and I want to get clear text boxand unselected dropdown every time my main vi calls the subvi. I did have blank as an default but once selected or input some text in it the next when that subvi is called it have those previous selection or text in it which I dnt want , how to get rid of those previous values and provide fresh text box and drop down value to the user

0 Kudos
Message 5 of 8
(3,397 Views)
Solution
Accepted by topic author AnkitG

Hello AnkitG,

 

It sounds like you're looking for the Reinitialize to Default method, which can be used either on the VI as a whole or a single control or indicator. This KnowledgeBase provides more information on the topic:

 

KnowledgeBase 339B1U3E: How Can I Programmatically Reset All the Controls on My Front Panel?

http://digital.ni.com/public.nsf/allkb/08E7DDAE66A7D02C86256DDA00630E75

 

There is also a community example linked to that page that demonstrates the use of the methods.

 

Regards,

Tom L.
0 Kudos
Message 6 of 8
(3,394 Views)

@0utlaw wrote:

Hello AnkitG,

 

It sounds like you're looking for the Reinitialize to Default method, which can be used either on the VI as a whole or a single control or indicator. This KnowledgeBase provides more information on the topic:

 

KnowledgeBase 339B1U3E: How Can I Programmatically Reset All the Controls on My Front Panel?

http://digital.ni.com/public.nsf/allkb/08E7DDAE66A7D02C86256DDA00630E75

 

There is also a community example linked to that page that demonstrates the use of the methods.

 

Regards,


Thanks outlaw, will try to use this.

0 Kudos
Message 7 of 8
(3,382 Views)

Hi Ankit,

 


I have a subVi with these controls in my main Vi, and I want to get clear text boxand unselected dropdown every time my main vi calls the subvi.


You need to connect those controls with your connector pane and do not wire anything to them in the main VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 8
(3,369 Views)