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: 

Get information at runtime if Ctl element wired?

Hi,

for case programming in SubVI I want to know, if a Ctl element of SubVI wired in the called VI.

Is this information available in SubVI and how can I get it programmately?

Thak you in advance

C. Dietz
Christian

Test Engineering
digades GmbH
www.digades.com
0 Kudos
Message 1 of 4
(2,561 Views)


@C. Dietz, www.digades.com wrote:
Hi,

for case programming in SubVI I want to know, if a Ctl element of SubVI wired in the called VI.

Is this information available in SubVI and how can I get it programmately?

Thak you in advance

C. Dietz


No this information is not available (or maybe it is but not in a way that is publically available). The way I solve this usually is to set the default value to something that makes not much sense (path=empty path, floating point=NaN, integer indices=-1) for that parameter and check for that.

Beats the use of undocumented methods that can and often do change in between LabVIEW versions by miles.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,559 Views)
it seems that the only advice i can get on how to check if a subVI terminal is wired is to compare the default value with new value.  i find that hard to believe but there it is.  so how can programmatically check what is the default value currently set?  i am trying to see whether a file path or a file refnum is wired.  thank you!
0 Kudos
Message 3 of 4
(2,273 Views)
Well, since you're writing the VI shouldn't you already know what the default value is? For paths and refnums it's easier to not set the default values and simply use the Not a Number/Path/Refnum function to determine if you have a valid path or refnum.
0 Kudos
Message 4 of 4
(2,269 Views)