10-14-2010 07:56 PM
I have noticed (again I suppose) that when I connect a "Variant to Data" output to a VI's connector or an indicator of known type, the wire automatically adopts the correct type. Does this mean I don't need to connect a wire to the "Type" input of the "Variant to Data" output?
Solved! Go to Solution.
10-14-2010 10:05 PM
Correct. It doesn't always work, though - if you get a broken wire, you probably need to wire the type input.
10-15-2010 05:58 PM
This is correct. If the wire isn't broken, you're fine. However, this only works if the function is connected directly to an indicator. If the wire has to pass through a case structure or loop boundary, this won't work.
10-15-2010 06:08 PM
OK. I have noticed that connecting to a "Value" Property node does not work either, very much in the same way that, if you connect a graph structure to a XY graph "Value" property node, it will result in a broken wire, unless you first connect the graph structure to the indicator. This apparently tells the indicator what kind of graph structure to expect. Then you can connect the graph structure to a "value" property node for that graph.
I am wondering why a "Value" property node cannot "tell" what type its indicator (or control) is. In the case of the graph indicator, that can make sense since I suppose the graph are "polymorphic" controls/indicators. But in the case of a scalar?
10-16-2010 11:54 AM
There are many similar situations where this shortcut does not work. For instance, wiring the Variant to Data function to a Bundle by Name node doesn't automatically select the conversion target type. I am guessing that the indicator case is a very specific optimization, and that this is not a generally available shortcut.