You can use data references with any data type, including classes. LabVIEW classes have a hierarchical relationship, and references to classes mimic that hierarchy. In other words, a subVI that expects a parent class reference can be passed a child class reference.
Configuration options on a LabVIEW class give you the ability to restrict the creation and destruction of references to member VIs of the class. You can guarantee that any reference to the class is one that has been defined through the proper initialization method whenever you encounter that type on any other VI's diagram.
Figure 3. You can restrict the creation and deletion of references to classes from the properties dialog for a LabVIEW class.
If the class is marked that only member VIs can create references for the class, then the New Data Reference function simply breaks if you try to create a reference to the class type on any other VI's diagram – this is enabled by default. A reference to a cluster of the class or an array of the class cannot be restricted.
You must maintain the type of reference at runtime, which means that you cannot exchange data values. With a new Preserve Run-Time Class.vi primitive, LabVIEW can guarantee runtime type consistency that you can use to swap two values. If you need a class reference that lets you change the underlying object, create a reference to a cluster of the class. This gives you the ability to swap values at the cost of hierarchical casting.
Figure 4. The "Preserve Run-Time Class.vi" gives you the power to swap values of different references.
A second option allows a parent class to become the exclusive factory for references for all descendant types, which is disabled by default. That restriction works the same as the restriction for references to the class itself.
If you have a data refnum for a child class, you can use To More Generic.vi to upcast to a parent class reference. Likewise, you can later use To More Specific.vi to bring the reference back to the original type. Upcast coercion dots appear when you wire a ref-to-child-class wire to a ref-to-parent-class terminal.