11-11-2015 04:09 PM - edited 11-11-2015 04:10 PM
In the attached VI:
select objects following the "Selection 1" box and go to Edit>>Create SubVI.
You should get something like this:
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:
in which the polymorphic label of the top VI is "accidentally" selected. Now Edit>>Create subVI should give you this:
Notice how the constant is now disconnected from the two top and bottom VIs.
Tested in LV 2015 64 bit
11-12-2015 09:43 AM
Does this happen the same with different programming blocks with polymorphic labels? Does it occur in 32-bit as well?
11-12-2015 11:55 AM - edited 11-12-2015 11:56 AM
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.
11-12-2015 12:45 PM
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.
11-12-2015 01:50 PM
I was expecting that the polymorphic selector behaved like a label as far as selection+create subVI is concerned.
In the example below:
even though the label of the top array is selected, choosing Create subVI leaves the object intact on the BD:
02-04-2016 01:13 PM
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).
02-04-2016 03:40 PM
Nice Ester egg!
02-04-2016 04:07 PM
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!
02-04-2016 05:10 PM
@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.
02-04-2016 09:31 PM
@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?