07-12-2024 05:49 AM
Hi all,
I have some concerns. I call VI as shown below, but this VI is part of class.
So normally I push class to it, but what shock me is that it still works even without specifying class and communication is proper as I can change some values in class.
My question is if it is just some luck that it works in this configuration or it is determined... As I would like to use it to other classes that I have in this program.
Best regards,
Solved! Go to Solution.
07-12-2024 11:59 AM
Your question is a little unclear but I think I understand it.
Are you saying that you are calling a VI by reference but that it is a Dynamic Dispatch class member and want to account for the fact that it might have an override written for it by a descendant class?
The main problem here is that a Dynamic Dispatch VI is only usable by calling it and passing in a class as an input which then determines which instance to call. Calling it with the "Run VI" method bypasses that since that method does not take values as inputs, it just runs the VI as if you had opened its front panel and pressed the "Run" button.
Is this a class you have complete control over and can rewrite as necessary, or is this a shared or password protected class that you have to leave alone? If you can modify it then there's a somewhat roundabout method to do what you want.
07-14-2024 08:25 AM - edited 07-14-2024 08:29 AM
Yes it is VI from Dynamic Dispatch class and I'm calling it by reference.
So just as I thought, it is a bit of luck that it works fine (in perspective that I wrote that without hesitation and just after 6 months started to think if it should work or not) even though I access camera session over it. And as I understand it worked because I had this class in memory and this calling found it, if I had two instances of this class or didn't open class before pop up it will end up with error?
I have full control over class so that is not a problem. In other application I call classes as separate popups/VI's (like I have few popups for each class). It's just that I had to lighten application a bit and created one popup/VI with tab control where I want subpanels of VI's from few classes.
So in summary I know how to call VI from class it's just that I want to call VI's from few classes as subpanels in one VI...
07-15-2024 11:48 AM
If you want a VI to work like a "proper" dynamic dispatch VI but still have the features you currently want to use, you will need to:
07-17-2024 12:56 AM
Thanks for answer I already use those solutions, but not together so I will try it.