One LabVIEW features that I both love and hate is the Diagram Disable Structure. I love the fact that you can comment out code, especially broken or stub (unfinished) code. However, I hate the fact that output tunnels of the Diagram Disable Structure are set to "Use Default if Unwired", because it causes buggy code. Here's an example...
Let's say that we have the block of code and want to comment out a VI.
So, we wrap the VI in a Diagram Disable Structure.
Everything is good, now, right? The VI's "Run Arrow" ()
button is not broken, so surely everything must be OK.
If we show the "Enabled" frame of the Diagram Disable Structure, we can
see that we're not passing though the DAQmx task reference and the
error cluster. Our code won't work.
To fix this problem we have to manually wire the DAQmx task
reference and the error cluster.
Now, we're good. But, we could have avoided this whole
the Diagram Disable Structure didn't set all the output
"Use Default if Unwired".
Presumably, this "feature" (although I like to think of it as a bug)
was chosen because users's code doesn't break (at least not at edit
time) when they wrap a block of code in a Diagram Disable Structure.
happily accept broken code at edit time to avoid code
with bugs -- the choice is obvious to me.
A good solution would be for the LabVIEW designers to make the Diagram
Disable Structure intelligent enough to automatically wire any
output tunnels to input tunnels that are of the same data type and
vertical position. Now, that would be cool!