Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Create Accessor Dialog Box

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Requires: Base Development System

From the Project Explorer window, right-click the LabVIEW class and select New»VI for Data Member Access from the shortcut menu to display this dialog box.

Note  You must define the private data of the LabVIEW class before you can use this dialog box.

You also can right-click a data member in the private data control of the LabVIEW class and select Create Accessor from the shortcut menu to display this dialog box.

Note  You must save a new LabVIEW class before using this dialog box to create accessor VIs. LabVIEW dims the VI for Data Member Access and Create Accessor options if you have not saved a new class.

In LabVIEW, the data of a class is private, which means only VIs that are members of the class can access the data. Use the Create Accessor dialog box to create one or more accessor VIs that are members of the LabVIEW class and can provide caller VIs access to the class data. You can create an accessor VI to read from or write to class data. If you create an accessor VI to read from class data, LabVIEW unbundles the class data for you. If you create an accessor VI to write to class data, LabVIEW bundles the new value into the class data for you.

This dialog box includes the following components:

  • Data member of X—Displays the data members of the LabVIEW class from which you can select. X is the name of the LabVIEW class. LabVIEW lists the data members in the Data member of X tree according to their position in the cluster of class data.

    If you press the <Ctrl> key and select more than one data member, LabVIEW creates an accessor VI for each data member.
  • Access—Displays the levels of access to the LabVIEW class data you can select for the accessor VI. Select from the following options:
    • Read—Creates a VI that reads from the LabVIEW class data. If you select this option, LabVIEW creates a VI that unbundles the data. Caller VIs can use this VI to read the class data.
    • Write—Creates a VI that writes to LabVIEW class data. If you select this option, LabVIEW creates a VI that bundles the data. Caller VIs can use this VI to write to the class data.
    • Read and Write—Creates both a VI to read from the data and another VI to write to the data.
  • Create dynamic accessor—Creates a dynamic member VI. Use this option if you need a VI that you later can override.
  • Create static accessor—Creates a static member VI. Use this option if you do not need a VI that you later can override.
  • Make available through Property Nodes—Specifies that the selected data member is accessible through a Property Node. By selecting this option, you can wire a LabVIEW class to a Property Node to access the private data of the class.
  • Advanced Options—Displays advanced options for the new VIs.
    • Include error handling terminals—Creates the new VIs with error in and error out terminals. This checkbox contains a checkmark by default.
    • Place new accessors in this folder (select existing or type name for new folder)—Specifies that LabVIEW places the new VIs into a virtual folder in your LabVIEW class.
Note  You can use this dialog box to create VIs to read or write single elements of an array in the private data control. If you select an array element, LabVIEW creates an accessor VI with a control that contains the array element and a control that contains either the array element index (one-dimensional arrays) or an array of indexes (arrays with more than one dimension). Creating accessor VIs to access an array element is particularly useful for modifying elements in very large arrays without creating unnecessary copies of the array.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit