01-30-2014 11:16 AM
If I create a control from a BD object such as a reference to a control, for instance, then copy this newly created terminal and try to paste it on another VI's BD, this fails. Nothing happens.
If, however, I switch to the other VI's FP and paste that copied "terminal", the control appears properly on the FP.
That looks odd to me and like a BIMB (bug in my book).
01-30-2014 11:56 AM
The opposite happens to me in LabVIEW 2013. The BD terminal pastes fine on the other VI's BD, but nothing happens if I try to paste it on the FP. That's what I'd expect, too.
01-30-2014 01:38 PM
Hmm.... That's odd. I use LV 2013 too so I started anew from scratch using a single control and things indeed function as you say (and as expected).
I am pretty sure of what I wrote but need to dig back to find the example I was using. It might have been a reference to some nested object in a cluster.
03-17-2014 01:55 PM
Just went through the same sequence of action and indeed, when copying a terminal from on VI's BD, it appears that you can only paste that terminal on another VI's BD. There is some logic to that, but there is some as well (I'd argue) to the decision to look at things from a FP point of view:
Typically, I will bundle a bunch of references on the original VI's BD in order to pass these parameters to a subVI on the BD.
Since there is no way to connect a new wire to a subVI yet, I need to go to the subVI's FP to create the corresponding connector.
However, as discussed, this does not work (pasting from the FP). One has to go through the BD, paste the terminal that was copied from the other BD and then find the corresponding, newly created Control. My expected behavior is that when I try to paste a terminal on the FP, the corresponding control should be created.
I am not sure what prevents this.
03-17-2014 05:23 PM - edited 03-17-2014 05:27 PM
OK, now is the beauty of the thing:
If you have a Tab control in which to put the (many) different controls of your top VI (let's say 100s of controls) and need to programmatically change the displayed Tab depending on user action and context. You may, like I did, create a subVI that takes a reference to the Tab control plus some other info and handles the changes in a subVI.
Now, if you modify the Tab control, say, by adding a tab, the wire connecting the Tab reference to the subVI will break, as the control in the subVI is no more of the correct type.
Here is whatI did, informed by the previous monologue: I copied the updated reference in the main VI BD and went to the subVI's BD, then pasted the reference.
Kaboom!
Here is the result:
In other words, when you paste a reference to a Tab control into a BD, it copies all the controls contained in the different tabs!
The proper way to do it then is to create a control for the reference in the original BD. Copy the resulting terminal and paste that terminal in the subVI.