Defining the Private Data of a LabVIEW Class

You can add controls to the cluster in the private data control of a LabVIEW class to create a data type.

Note  You cannot add controls to an interface because interfaces do not contain any private data.

Complete the following steps to define a LabVIEW private data control.

  1. Create a new LabVIEW class or open an existing class by selecting File»Open and navigating to the class you want to open.

    The private data control appears underneath the class icon in the Project Explorer window.
  2. Double-click the private data control. The Control Editor window appears.
  3. Add controls and indicators to the Cluster of class private data to define your data type, if necessary.

    Note Note  A private data control cannot contain an XControl.
  4. Select Edit»Make Current Values Default to set the default value for the entire cluster. LabVIEW sets the current values in each element as the default value for those elements.

    Note Note  The value you set as the default value of the private data control is the default value for all controls, indicators, and constants of the class type.
  5. Save the private data control.
Note Note  LabVIEW saves the private data control inside the .lvclass file. The control does not have a separate file on disk. Saving the private data control with the LabVIEW class definition helps to prevent user errors.