LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find out whether an optional argument has been wired?

Hi,

is there property I can check to find out if an optional argument to a subVI has been wired? Or a function (like nargin/nargout) that tells me how many arguments have been connected in the calling VI?

Thanks,

Jochen Smolka
0 Kudos
Message 1 of 3
(2,863 Views)
One solution would be to define unique default values for each control assigned to an input connector. Pick something that is unlikely to occur under normal use (e.g. NaN for DBL, empty array for arrays, "--unwired--" for strings, etc.).
 
Now you can just check for the special value, which then would indicate that the input wasn't wired.
0 Kudos
Message 2 of 3
(2,861 Views)
Thanks for the reply, I guess that'll have to do 😉
0 Kudos
Message 3 of 3
(2,850 Views)