core

### Exporting to a DMIS File

DMIS files adhere to the DMIS standards for DMIS commands. You can execute DMIS files on other applications that use the DMIS language.

To export your PC-DMIS measurement routine file as a DMIS file, perform the following steps:

1. Select File | Export | DMIS. This action opens the Export dialog box.

2. In the Export dialog box, choose a file name and click Export to open the DMIS Export Setup dialog box. This dialog box contains the General tab and the Error Log tab.

3. After you choose your options on these tabs, click OK to complete the export process.

General tab

DMIS Export Setup dialog box - General tab

The General tab lets you choose one of three methods to convert your PC-DMIS measurement routine into a DMIS file.

- PC-DMIS Edit Window (DMIS Mode) - This method exports a DMIS file exactly as the measurement routine looks in the Edit window when you are in DMIS mode.

- Flexible DMIS - This method allows you to customize the exported file to match your specific DMIS version, measurement methods, or supported DMIS statements. When you select this option, a file selection box becomes enabled that allows you to browse to and select a specific BASIC script file (*.bas extension). You can create your own script file, or modify an existing script file to control exactly what PC-DMIS should export.
  PC-DMIS provides you with three ready-to-use .bas files that reside in your PC-DMIS installation directory. These files customize your export so that it uses a defined subset of supported DMIS statements for a specific DMIS version. The files are PCD2DMIS030.BAS, PCD2DMIS040.BAS, and PCD2DMIS050.BAS (for DMIS 3.0, 4.0, and 5.0 respectively). The commands that are not customized in the .bas file are exported as they are for the PC-DMIS Edit Window (DMIS Mode) option.

If a function in the BASIC script returns an error when you use this option, then the exported file gets written as if you had selected the PC-DMIS Edit Window (DMIS Mode) option above.

- Legacy Postout - This method exports the file as it used to in older versions of PC-DMIS.

Error Log tab

DMIS Export Setup dialog box - Error Log tab

The Error Log tab lets you view or save errors encountered during an export phase so that you can correct them in your script file or take some other appropriate action. PC-DMIS displays errors or warnings in these instances:

- When a function in the BASIC script returns a logical error, meaning you have a problem somewhere in your script that's causing an automation logic error. In this case, the BASIC Script function returns a text string with this header: $$ LOGERR |.

- When a parameter in a PC-DMIS command cannot be converted into DMIS code. In this case, the BASIC Script function returns a text string with this header:
  $$ DMISERR |

Click the ... button to locate and select an existing text file to which PC-DMIS should send the errors.

Click the Display log when export is complete check box to display the text file in a text editor once PC-DMIS finishes the export process.

SuppressDMESWComandOutput Registry Entry

A SuppressDMESWComandOutput registry entry lets you suppress DMESW/COMAND statements in the output file with the $$ comment marker prefix if you use the Flexible DMIS export method discussed above. See the "SuppressDMESWComandOutput" topic in the PC-DMIS Settings Editor documentation.