Admin Production ni-theme
Current Publication

Copying and Pasting Help Text

LabWindows/CVI

Copying and Pasting Help Text

In this exercise, you will copy text between function panels, controls, and instruments. The clipboard retains its contents as you move between controls, function panels, and even instruments. Help text also stays with a control or function panel that is cut, copied, or pasted.

Complete the following steps to copy the help between controls on different panels.

  1. Create a new function panel window for help.fp. Type Function 2 in the Name box and fun2 in the Function Name box.
  2. The Function 1 function panel from the previous example should be on the screen in Edit mode. Double-click Function 1 in the Function Tree Editor.
  3. Select Create»Global Variable.
  4. Type Status in Control Label and ibsta in the Global Variable Name. Leave all other items at their default settings. Click OK.
  5. Add the following help to the global control.

    This control displays the status of GPIB function calls.
    Errors:
    0 Success
    non-zero See the Status control on any GPIB Library function panel
  6. Select File»Save .FP file then File»Close to save the text and exit the Help Editor.
  7. Select the Status control. Select Edit»Copy Controls.
  8. Press <Ctrl-Page Down> to display the Function 2 function panel.
  9. Select Edit»Paste. The Status control appears on the function panel.
  10. Select Options»Operate Function Panel and view the help. Notice that the help stays with a control when you copy that control.

Complete the following steps to copy the help text without copying the control.

  1. Select Options»Edit Function Panel.
  2. Select Create»Global Variable.
  3. Complete the Create Global Variable Control dialog box as follows. Type Error in Control Label and iberr in Global Variable Name. Leave all other items at their default settings. Click on OK.
  4. Select the Status control.
  5. Select Edit»Control Help or right-click the control and select Control Help.
  6. Select all the text in the dialog box.
  7. Select Edit»Copy.
  8. Select File»Close.
  9. Select the Error control.
  10. Select Edit»Control Help or right-click the control and select Control Help.
  11. Select Edit»Paste. The help appears in the window.
  12. Modify the text so it reads as follows:

    This control displays the value of the GPIB global error variable.

    The control displays the value of the error only when the Status control is non-zero.


    Errors:
    0 Success
    non-zero See the Status control on any GPIB Library function panel

In these examples, you have learned to copy or move text from one control to another. Use the same methods to copy and move help text between various locations. For example, use these methods to copy and move panel, instrument, window, and control help within an instrument driver or across instrument drivers.