09-14-2017 06:38 AM
Hello,
I am calling child implementation of come class. Child implementation loads some vis dynamicly based on class name. I am using Get LV Class Name.vi to do get the full name of loaded implementation. I need to do the same for base class when child implementation is running to load other vis dynamicly.
Is there a programatic way to do that? I want this to be universal so path always will be correct, when I use this class standalone or load form ppl.
09-14-2017 07:29 AM
Just use the Call Parent Method and let the parent handle it.
09-14-2017 07:33 AM
Another stupid thought: Make a protected method in your parent class that outputs both the parent's path/name and the child's path/name. Then you can just have any child classes call it.
09-14-2017 09:54 AM
Usually, those dynamic VI's (based on class name) can be made static for each child. So, make a VI that returns the reference, and implement the VI for all children. Each VI returns a different VI, by simply returning it's static VI reference.
Doing this by name is a hack (although you might need to get the VI name from the reference so you can instantiate a clone). You can't find where the VI's are used (find all instances), you won't notice broken VI's (unless they are in the class), they aren't automatically included in executable (unless in class), etc.