08-15-2019 06:47 AM
@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.
08-15-2019 08:01 AM
@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
08-15-2019 09:22 AM - edited 08-15-2019 09:38 AM
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.....
Yeah, seems just made 3 VIs and 3 Poly VIs and a single VI can exist in multiple poly VIs no problem.
08-15-2019 09:56 AM
@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.....
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!
(Smiley-wink)
Ben
08-15-2019 08:36 PM - edited 08-15-2019 09:02 PM
@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.