LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inherit from vi.lib class: correct way

Hello, everybody! 

 

The situation:

    1) I would like to reuse the Color Editor.vi that is situated on 3D Plot.lvclass, which is part of vi.lib, this vi is in 3D Plot.lvclass Protected Scope

    2) As I understood a way to do it is to create MyClass.lvclass that contains all the VIs in my project and inherits from 3D Plot.lvclass. Then I can freely use protected scope VIs of 3D Plot.lvclass

 

The question:

     What is the proper way to set inheritance? For the moment the only way I found is to create a copy of 3D Plot.lvclass in my project (say My 3D Plot.lvclass) and inherit from there. But this looks quite unnatural to me (copying the code here and there....). The original 3D Plot.lvclass (situated in my dependencies and if it is actually original class and not a copy with the same name...) is locked in my project, probably as it is used by 3D Surf XControl.

 

Additional question:

    Why labview locks classes?... I would expect to be able to include a class in dependencies  and use it by as many VIs as I want ( as it would be say with #include <myclass> in C++) and freely create classes, inheriting from it.... 

 

Thanks in advance for any help!

0 Kudos
Message 1 of 1
(861 Views)