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: 

How do I add code to determine which child class is over-riding?

I have a Dyanmic dispatch wire in a subVI that will be over-ridden by one of a few available child classes, and want to add a case structure to do something different depending on which class is over-riding. How do I add code to determine which child class is over-riding?

0 Kudos
Message 1 of 3
(648 Views)

You can use the Get LV Class Name VI to get which class is actually on the wire, but even that won't tell you for sure which class is overriding it because you won't be able to know with certainty which classes have overrides and which call their parent class.

 

What you're describing though is generally against OOP principles though.  Can you explain more about what exactly you need to do differently and why you need to do it?  There's almost certainly a better solution.

0 Kudos
Message 2 of 3
(639 Views)

Just use a class method to do the "something different" for each class.  That is the point of Dynamic Dispatch.


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
0 Kudos
Message 3 of 3
(617 Views)