By default, all LabVIEW classes inherit from LabVIEW Object. To create classes that inherit from other classes, you must change the inheritance of a class. Complete the following steps to change the inheritance of a LabVIEW class.
- Create two new LabVIEW classes or use existing classes.
- Right-click the icon of the class whose inheritance you want to change and select Properties from the shortcut menu.
The Class Properties dialog box appears.
- Select Inheritance from the Category list.
The Inheritance page displays the current inheritance of the LabVIEW class.
- Click the Change Inheritance button.
The Change Inheritance dialog box appears. In the All Classes in Project list, the diamond glyph indicates the current class whose inheritance you want to change.
- Select the class from which you want the current class to inherit and click the Inherit From Selected button.
|Note If you select a class in the All Classes in Project list that the LabVIEW class cannot inherit from, LabVIEW displays an invalid glyph next to the class. A LabVIEW class cannot inherit from any of its descendants or from any classes that use the class as part of its private data.|
LabVIEW returns to the Inheritance page of the Class Properties dialog box and updates the Inheritance Hierarchy.
- Click the OK button to save the inheritance configuration and close the Class Properties dialog box.