Edit Code Template Dialog Box

Click Edit on the Code Templates tab of the Step Type Properties dialog box to launch the Edit Code Template dialog box.

The Edit Code Template dialog box contains the following options:

  • Description —The description string for the code template.
  • Type —The code template type.
  • Path —The code template file path.
  • Edit Code —Launches the application Microsoft Windows associates with the file extension of the code module.
  • Require Sequence Context —When you enable this option, the code template requires that the sequence context be passed. When you enable this control, TestStand completes the next step according to the environment the code template was created in.
    Note Require Sequence Context is available only for legacy templates.
  • Parameter Name/Value Mappings —The default parameter values to use on the Module tab of a Specify Module dialog box for the adapters. TestStand applies the default parameter values when you click Create Code on the Source Code tab of the Specify Module dialog box. In a template code module, you can access step properties and sequence variables through the TestStand API or as parameters to the code module. If you access them as parameters, you must specify the parameter values in the appropriate Specify Module dialog box. Since the values you must specify are usually the same for most step instances, specify the default parameter values TestStand automatically populates in the dialog box when you click Create Code or Create VI .
    Note
    • The controls in the Parameter Name/Value Mappings section are not available when you are using legacy or HTBasic templates.
    • The controls in the Parameter Name/Value Mappings section are only visible when you edit code templates for adapters that support parameter passing.
    The Parameter Name/Value Mappings section contains the following options:
    • Add —Inserts an empty entry at the end of the listbox.
    • Delete —Deletes the currently selected entry in the listbox.
    • Parameter Name —Sets the name of a parameter exactly as it will appear in the parameter list in the template code module. To specify the return value for LabWindows/CVI and C/C++ DLL templates, use %ReturnValue .
    • Value Expression —Sets the expression you want TestStand to insert into the Value control for the parameter on the Module tab of the appropriate Specify Module dialog box.
    • Result Action —Selects the value you want to appear in the Result Action ring control of the Module tab. Use the ring control on the Module tab to instruct TestStand to automatically set the Error.Occurred step property to True when the return value or parameter value after the call is greater than zero, less than zero, equal to zero, or not equal to zero.
      Note This option is available only for LabWindows/CVI and C/C++ DLL templates.
    • Set Error.Code to Value —The state, enabled or disabled, of the Set Error.Code to Value option on the Module tab of the appropriate Specify Module dialog box, which is where you enter return values and reference parameters. Use this option to instruct TestStand to automatically assign the return value or the output value to the Error.Code step property.
      Note This option is available only for LabWindows/CVI and C/C++ DLL templates.

See Also

Accessing Properties and Variables Using API (Example)

Edit LabVIEW VI Call dialog box

Edit LabWindows/CVI Module Call dialog box

Module Tabs and Specify Module Dialog Boxes

Step Type Properties dialog box