How Do I Access Private Parent Class Data Members in LabVIEW OOP?

Updated Oct 7, 2019

Reported In

Software

  • LabVIEW

Issue Details

I have a child class that is inheriting from a parent class, but I can't see the private data members that are inherited from the parent when I use Unbundle by Name. How can I access these?

Solution

Parent class private data members are accessed through VIs that are created in the LabVIEW project.

The parent has private data members defined by the class.


To create a VI that allows access to those data members,

1. Go to the LabVIEW project and create a new VI for Data Member Access.

2. Create the accessor VI

3. See the accessor VI in your LabVIEW project

4. Drag it onto the block diagram where you are trying to access the private data members inherited from the parent class.

5. You can create additional VIs for accessing private data members inherited from the parent class. However, you can also edit the VIs to access multiple or different private data members by accessing the block diagram of the accessor VI.