##### Automatic Script Processing

There are two ways to automatically invoke a script when the CNC Server processes new data. If there is a file with the identical in name to the current PC-DMIS program, but has the extension scr, that script file will be invoked after the program is processed.

1. Example 1 - the PC-DMIS program is C:\PCDMISW\BLOCK.PRG is executed and the file, C:\PCDMISW\BLOCK.SCR exists, the script file processor will be invoked to execute the file.

2. Example 2 - If the file described in Example 1 does not exist, the file AUTOMATIC.SCR will be invoked if it exists in the PC-DMIS installation directory (for example C:\PCDMISW\AUTOMATIC.SCR).

When scripts are automatically executed you can pass two additional pieces of information to the script. One is the machine name, the other is the part name. As the string is processed in the script processor they are scanned for the words [MACHINE] and [PART]. If [MACHINE] is found, it is replaced with the machine name. If [PART] is found it is replaced with the part name. These substitutions can be used to customize script files and/or to chain specialized script files.

More:

Sample Script with All Commands

Chained Sample Script