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: 

LabVIEW Bug Report: Create VI from selection

In the attached VI:

 

Create SubVI selection.png

 

select objects following the "Selection 1" box and go to Edit>>Create SubVI.

You should get something like this:

 

Screen Shot 2015-11-11 at 14.05.28.png

Everything works as expected (except for wire routing, but that is expected too).

 

Now Undo and repeat the process using the "Selection 2" contour. You should strive to obtain that selection:

 

Screen Shot 2015-11-11 at 14.07.10.png

 in which the polymorphic label of the top VI is "accidentally" selected. Now Edit>>Create subVI should give you this:

 

Screen Shot 2015-11-11 at 14.08.25.png

 

Notice how the constant is now disconnected from the two top and bottom VIs.

 

Tested in LV 2015 64 bit

0 Kudos
Message 1 of 11
(4,470 Views)

Does this happen the same with different programming blocks with polymorphic labels? Does it occur in 32-bit as well?

0 Kudos
Message 2 of 11
(4,421 Views)

Regarding the first question, yes. In fact this is a completely made up diagram reproducing the phenomenon, which I first noticed in my own code using different polymorphic VIs.

As far as 32 bit, I haven't tried, but I would suspect this behaves just the same.

 

BTW, the first picture is a VI snippet (2015 version), therefore it can be saved and then dropped into an empty VI diagram. This will recreate the VI, which you can then test.

0 Kudos
Message 3 of 11
(4,396 Views)

I can confirm the behavior you're seeing.  I tried in both LV 2015 32 bit and LV 2014SP1 32-bit.

 

It seems like a bug to me.

 

One question I have for you is, if you grab the polymorphic selector as part of the selection, do you expect that function to be included in the subVI or left out, that you'd have to actually select a part of the body of the function block to be included?

 

It seems that LV is treating the selector as somewhat a part of the function, but not really.  Enough that it wants to break off the wire that is going to it (and for some odd reason the wire going to a different node on the diagram), but yet not a part of the function that it isn't actually adding the function to the subVI.  The scripting code seems to be in a confused state that just doesn't handle the selection properly.

0 Kudos
Message 4 of 11
(4,381 Views)

I was expecting that the polymorphic selector behaved like a label as far as selection+create subVI is concerned.

In the example below:

 

Screen Shot 2015-11-12 at 11.49.02.png

 

even though the label of the top array is selected, choosing Create subVI leaves the object intact on the BD:

 

Screen Shot 2015-11-12 at 11.49.15.png

0 Kudos
Message 5 of 11
(4,367 Views)

Thank you for pointing this out, I submitted CAR #571520: Creating SubVI from Selection with Polymorphic VI Selector Selected Can Remove Wires and Cause Broken Wires.

 

Bonus Feature!

 

I found this while confirming and reporting this bug. Select a function and only the Polymorphic VI Selector of another function. Right-click the first function and select Visibile Items > Label. You end up with a label on the selector itself which can't be done any other way as far as I could tell (didn't try scripting it).

 

Hidden Feature.PNG

Matt J | National Instruments | CLA
Message 6 of 11
(4,100 Views)

Nice Ester egg!

0 Kudos
Message 7 of 11
(4,076 Views)

Well, Matt I get to feed your addiction!

 

Heep Peek that polymorhic selector label!  (But you might have already done that)  And get that CAR over to another spreadsheet-  I want to track that!


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 11
(4,059 Views)

@JÞB wrote:

Well, Matt I get to feed your addiction!


I can quit any time I want!


Heep Peek that polymorhic selector label!  (But you might have already done that)  And get that CAR over to another spreadsheet-  I want to track that!


I'll have to ask someone how to do this properly. I may also have to spread out the filing of trivial CARs to avoid a cease and desist from our LabVIEW Product Support Engineers.

Matt J | National Instruments | CLA
Message 9 of 11
(4,041 Views)

@Jacobson-ni wrote:

@JÞB wrote:

Well, Matt I get to feed your addiction!


I can quit any time I want!


Heep Peek that polymorhic selector label!  (But you might have already done that)  And get that CAR over to another spreadsheet-  I want to track that!


I'll have to ask someone how to do this properly. I may also have to spread out the filing of trivial CARs to avoid a cease and desist from our LabVIEW Product Support Engineers.


Use the Breakpoint Bug Report Thread.  Chris Cliino can provide guidance.  I agree that I may have less ability to judge the overall impact of the bug level.  (Heck, I filed the only "Unnoticable" CAR I've ever seen)..But "Labels" concern me so, as a favor buddy?


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 11
(4,013 Views)