Configuring the Script block

In this section we show some of the functionality of the Script block.  The Script block is extremely versatile. It is able to modify all of the properties of its input fields and generate output fields.

Return to Overview of the Script block

On this page you can find out about:

Script block features

To open the block property page (the page on which the block configuration is specified), either double click on the block or right-click on the block and select Block Properties.  

Return to top

Editing options on the Script tab

  1. The Script block opens on the Script dialog.

  2. The script is typed in the top box (the Script editor). >> More about the scripting language

  3. When the script is checked for errors, using the Check script or F4 buttons, the error messages, if errors are present, will be displayed in the bottom box (the Output pane).

  4. An error may be located by double clicking on the error message in the Output Window. The Script Editor will scroll the line containing the error to the top of the window.

  5. The Status bar is immediately below the Output pane and displays the state of the script (it shows whether the script has been checked or not).  It also displays the current cursor line and column position (see the right-hand side of the status bar).

  6. Script files may be imported using the Load from file

  7. Script files may be exported using the Export to file

  8. To start a new script click on the New script

  9. The name of the file that was last imported or exported into or out of the Script block is displayed in the Script File Name box (on the right-hand side above the script editor window)

Return to top

Editing options on the Output fields

Next to the Script dialog is the output field’s manipulation area. The list shows all the input fields (in grey) and all output fields (in blue).

1. To add a new output fields simply type in a unique name in the Output Field Name edit box and select its data type using the Type drop-down box. Then press the Add button to add it to the Fields list.

2. To change an output field name, select the output field in the Output Fields list, click on the field or press F2 and type the new field name

3. The field’s pane may be hidden or unhidden by pressing the long narrow button between the script dialog and the field’s pane. This is handy when one needs maximum space for working on the script dialog.

4. To remove an output fields simply select the field and press the DELETE key on the keyboard or press the Delete selected output fields check button . Pressing the button when no output fields are selected will delete all the output fields. An output fields that is reference in the script dialog will, after it has been deleted, appear on the Script Variable Dialog.

5. The Create Output Field from Input Field check button allows the user to copy an input field to an output port.  The values of the output fields are copied from the input fields before the script executes.

6. To force all the output fields to have the same type, check the Use same type for all check-box and then select the data type from the Type drop-down list.

Note : Output field names must be unique

  

Return to top

Additional information

The following short-cut keys display useful lists while editing the script:

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025