LabWindows/CVI

Content Type
Programming Language
Current manual

Edit Driver Attributes Dialog Box

Edit Driver Attributes Dialog Box

When you launch the Attribute Editor, the Edit Driver Attributes dialog box appears, as shown in the following figure.

Instrument Attributes List Box

The Instrument Attributes list box on the left side of the dialog box contains all attributes for which the Attribute Editor found an Ivi_AddAttribute call in the Prefix_InitAttributes function. The list box also displays the inherent IVI attributes that the.sub file describes. The Instrument Driver Development Wizard generates the descriptions of the inherent attributes in the .sub file automatically.

The attributes are grouped hierarchically in the list box. You can have group labels on the first and second level. You can have attributes at the first, second, or third level. The Attribute Editor reads the hierarchy information from the .sub file. After you select an entry, double-click, press <Enter>, press <Alt-Enter>, or right-click and select Edit to display the Edit Group or Edit Attribute dialog box, depending on the selected entry.

When you right-click an item in the list box, press <Enter>, or press <Alt-Enter> when you select an item, a context menu appears. The context menu always contains an entry to edit the selected item. If you select an attribute in the list box, then the context menu contains additional entries to navigate to an available callback or range table.

Restrictions on Modifications to Inherent and Class Attributes

In the list box, special rules apply to inherent and class attributes.

The following actions are not possible.

  • Edit, expand, cut-and-paste, or copy an inherent IVI attribute.
  • Move the items within the Inherent IVI Attributes group.
  • Edit the label or help text for the group. You can, however, move the entire group up or down in the list box.

When you use the Instrument Driver Development Wizard with a predefined instrument template, the wizard generates all the instrument class attributes into driver files. In general, you can edit, expand, copy, and move class attributes freely. Also, you can cut class attributes. The Attribute Editor prompts you for confirmation when you cut a class attribute that the class driver include file indicates is fundamental to the class. When you cut an extended class attribute, no confirmation is necessary.

Instrument Attributes List Box Commands

This section describes the command buttons in the Edit Driver Attributes dialog box.

  • Add Attribute—Adds a new attribute to the list box. Invokes an empty Edit Attribute dialog box in which you can enter the attribute information.
  • Add Group—Adds a new group label to the list box. Launches an empty Edit dialog box in which you can enter the label and help text for the group. Instrument driver users view the help text in the Select Attribute Constant dialog box that they access in the Get/Set/CheckAttribute function panels.
  • Copy—Makes a copy of the attribute you selected.
  • Cut—Cuts the attribute you selected.
  • Paste—Pastes a duplicate of the attribute you cut or copied.
  • Move Up/Down—Moves attributes up or down in the list box.
  • Move Right/Left—Indents attributes left or right for logical grouping and readability.
  • Edit—Modifies a group or attribute. Launches the Edit Group or Edit Attribute dialog box for the currently selected item.
  • Range Tables—Displays a list of range tables in the driver.
  • Add Class Attributes—Adds class attributes that the driver does not currently implement. This command is useful if you previously deleted one or more class attributes or if a new version of the class definition contains additional attributes. The Attribute Editor identifies the class definition that the specific driver uses by searching the specific driver header file for an #include statement that refers to a class header file. If the Attribute Editor cannot find an #include statement for a class driver header file, Add Class Attributes appears dim. When you click Add Class Attributes, the Attribute Editor uses the predefined instrument template for the class that the Instrument Driver Development Wizard uses. The Attribute Editor builds a list of the class attributes that are not currently in the list box. You can select one or more attributes to add.
  • Apply—Updates the .c, .h, and .sub driver files with the Attribute Editor changes. The Attribute Editor changes include generating empty function definitions for callbacks you added, removing callbacks you deleted, adding or modifying range table entries, adding #define statements for attributes in the header file, and modifying help text in the .sub file. You can apply changes without exiting the Attribute Editor.

    When you invoke the Attribute Editor, the source file might reference range tables in the Prefix_InitAttributes function without definitions for them. When you click the Apply button, the Attribute Editor creates empty definitions for them. The Attribute Editor does not create empty definitions if the range table name is a variable. After invoking the Attribute Editor when you click Apply, the Attribute Editor backs up the instrument driver files before it applies modifications. If the driver files have unsaved changes, the Attribute Editor prompts you to save the files before it backs them up. The Attribute Editor creates the driver backup file directory. On most platforms, the Attribute Editor copies the driver files and appends .bak to each filename. The Attribute Editor overwrites existing backup files in the directory.

    After Apply updates the driver files with the modifications, the Attribute Editor saves the driver files to disk. The Attribute Editor also purges all undo information for the .c and .h files.
  • Close—Exits the Attribute Editor. Prompts you to apply any unsaved changes.
  • Help—Launches LabWindows/CVI Help.
Was this information helpful?