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: 

What polymorphic does a VI belong to?!

Solved!
Go to solution

@Yamaeda wrote:

@Intaris wrote:

Infact, a single VI can be used in several Polymorphic VIs, there is no "owner" of the sub-VI in the sense of LVOOP.  A Polymorphic VI is just an aggregation of individual VIs.  A Polymorphic VI knows who it's members are, but the members don't know they're part of a Polymorphic VI.

 


Look at that, i learned something today! I've never reflected over how polymorphism works in LV, i assumed they were a 'library' so both parties knew about it.

/Y


One of the reasons I like to make a Polymorphic VI a public member of a library, but the instances are Private.  Granted, as soon as I can upgrade from 2016, a bunch of my polymorphic VIs will be replaced with Malleable VIs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 15
(520 Views)

@Yamaeda wrote:

@Intaris wrote:

Infact, a single VI can be used in several Polymorphic VIs, there is no "owner" of the sub-VI in the sense of LVOOP.  A Polymorphic VI is just an aggregation of individual VIs.  A Polymorphic VI knows who it's members are, but the members don't know they're part of a Polymorphic VI.

 


Look at that, i learned something today! I've never reflected over how polymorphism works in LV, i assumed they were a 'library' so both parties knew about it.

/Y


Ditto that!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 15
(514 Views)

Hmm. I'm surprised by the reactions. I thought this was general knowledge.

 

Am I even correct with my claim? Reactions from experienced users makes me want to validate my claim to make sure I'm not mistaken..... Smiley Frustrated

 

Yeah, seems just made 3 VIs and 3 Poly VIs and a single VI can exist in multiple poly VIs no problem.

0 Kudos
Message 13 of 15
(502 Views)

@Intaris wrote:

Hmm. I'm surprised by the reactions. I thought this was general knowledge.

 

Am I even correct with my claim? Reactions from experienced users makes me want to validate my claim to make sure I'm not mistaken..... Smiley Frustrated

 

Yeah, seems just made 3 VIs and 3 Poly VIs and a single VI can exist in multiple poly VIs no problem.


That would not be me!

 

Quoting myself from above...

"

Now as far as polymorphics...

 

I find them irritating since they use WORDS

"

 

Asking me would be like asking a person deaf in one ear what they thought of the depth of the music from stereo recordings!

 

Spoiler
I am completely deaf in one ear and have never experienced stereo, sound direction, or "depth" so don't ding me for knocking deaf people. I is one.

 

(Smiley-wink)

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 15
(489 Views)

@Intaris wrote:

A VI can simultaneously be used as part of a polymorphic VI and be used independently.  Inf act, a single VI can be used in several Polymorphic VIs, there is no "owner" of the sub-VI in the sense of LVOOP.  A Polymorphic VI is just an aggregation of individual VIs.  A Polymorphic VI knows who it's members are, but the members don't know they're part of a Polymorphic VI.

 

As such, there is no guarantee that a single VI has a 1:1 relationship to a given polymorphic VI at all. I would concur with Ben that the VI Hierarchy is probably the best was to find out any existing relationships (Assuming the polymorphic VI is actually in memory).

 

So the reason why you can't have a right-click menu stating "Which polymorphic owns this VI" is because polymorphic VIs don't OWN instance VIs at all. It's a fleeting acquaintance at best.

 

And having said all that, an entry for "Show polymorphic Usage" to open a possible dialog with multiple Polymorphic VIs would be super useful. But it would have to deal with multiple polymorphic VIs using the same instance VI.


The member VI may not know it's part of a poly, but the project does!  It will list any polys the member belongs to when you find the member's callers.  The nice thing about finding it through the project is that it doesn't need to be in memory.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 15 of 15
(468 Views)