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: 

Paste oddity (Bug Report)

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).

 

0 Kudos
Message 1 of 5
(2,610 Views)

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.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 5
(2,595 Views)

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.

0 Kudos
Message 3 of 5
(2,578 Views)

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.

0 Kudos
Message 4 of 5
(2,479 Views)

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:

 

ScreenHunter_001.jpg

 

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.

0 Kudos
Message 5 of 5
(2,458 Views)