LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Interface Example

Hello,

 

I have been looking at interfaces in LabVIEW 2020.

 

Can Interfaces inherit from another class?

 

In the shipping example in LabVIEW 2020 there is a Lever Interface.  A lever is a tool.  So should/can the lever interface inherit from tool?  Is this a good idea?

 

ASTDan_0-1616174405124.png

 

Thanks

Dan Shangraw, P.E.


   

0 Kudos
Message 1 of 4
(1,387 Views)

I tried to set the inheritance in the Lever Interface and it looks like an interface can only inherit from LabVIEW Object.

 

ASTDan_0-1616174601039.png

 

Dan Shangraw, P.E.


   

0 Kudos
Message 2 of 4
(1,381 Views)

RTFM

 

Right on the front panel in bold...

 

A class may inherit from only one parent class but as many parent interfaces as needed for its role in the software. Inheriting from an interface allows that class to be wired to any terminal of that interface type.

Dan Shangraw, P.E.


   

0 Kudos
Message 3 of 4
(1,376 Views)

Hi

I have a question about the House Key.
Why is it not inherit from Tools? I see it as a tool.

Thank in advance

/Bjarne

0 Kudos
Message 4 of 4
(1,136 Views)