### Exporting to a DMIS File

PC-DMIS lets you export your PC-DMIS part program file as a DMIS file. DMIS files adhere to the DMIS standards for DMIS commands and can executed on other computers by applications that use the DMIS language.

After choosing a filename and clicking Export from the Open File dialog box, PC-DMIS displays the DMIS Export Setup dialog box. This dialog box contains two tabs, the General tab and the Error Log tab.

After choosing 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 part program into a DMIS file.

- PC-DMIS Edit Window (DMIS Mode) - This method exports a DMIS file exactly as the part program 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 which are not customized in the .bas file are exported as they are in the PC-DMIS Edit Window (DMIS Mode)

Note: If a function in the BASIC script returns an error when using 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. Before version 4.0, needed to set the DMISUsePostoutCode entry to TRUE in the PC-DMIS Settings Editor to accomplish this. Now, you can simply select this option.

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. You will receive 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 are using the Flexible DMIS export method discussed above. See the "SuppressDMESWComandOutput" topic in the "PC-DMIS Settings Editor" documentation.