Share
 
 

To create a Custom Action item

Use the Custom Action item to run an external script or macro during the inspection. For example, you can use it to automate further processing or archiving of your measurement data.

To create a Custom Action item:

  1. Click Measure tab > Items panel > Custom Action. The Custom Action Item dialog is displayed.

  2. To run a script:
    1. Select Script and click to enter location of the script.
    2. Enter any command-line arguments required by the script. Individual arguments must be separated by one or more spaces.
    3. To view or update the script, click Edit. The script is displayed in your text editor.

    To run a macro, select Macro / Add-in and enter location of the macro or add-in.

  3. Click OK to close the dialog and add the item to the inspection sequence.

Example script

The following script, DisplayArguments.wsf, displays the command-line arguments in a message box when played in the inspection sequence:

<job>
<script language="VBScript">
dim arg 
dim i 
   for i = 0 to Arguments.Count 
   MsgBox Arguments.Item(i) 
next
</script>
</job>

Was this information helpful?