core

### Understanding the Syntax for the PRINT/REPORT Command

The syntax of the command is as follows:

PRINT/REPORT,EXEC MODE=END,$

TO_FILE=OFF,TOG1,AUTO OPEN=OFF,$

TO_PRINTER=OFF,COPIES=,$

TO_DMIS_REPORT=OFF,FILE_OPTION=TOG2,FILENAME=,$

REPORT_THEORETICALS=ALL,REPORT_FEATURE_WITH_DIMENSIONS=YES,$

TO_EXCEL=OFF,TOG3, AUTO OPEN=OFF,$

PREVIOUS_RUNS=DELETE_INSTANCES

EXEC MODE = Because DMIS and PC-DMIS manage report data differently, this option controls how and when the software sends report data to DMIS and PC-DMIS output files. DMIS requires that the output filenames and other printing parameters be defined first before the routine is executed. PC-DMIS, on the other hand, waits until after the measurement routine is executed before deciding where to dump the report data. With this option, you can support both formats. It takes one of two values, either START or END.

START
This tells PC-DMIS to begin printing when it either encounters the end of routine or another PRINT/REPORT command. If you import a DMIS file, and it has a print report command, it uses START as its initial value.

END
This tells PC-DMIS to print everything already executed up to this PRINT/REPORT command. If you don't import a DMIS file with a print report command, but instead insert your own PRINT/REPORT command from within PC-DMIS, it has END as its initial value.

If your measurement routine contains more than one PRINT/REPORT command, be aware that PC-DMIS may not print some commands. For example, if your first PRINT/REPORT command uses END and your second print report command uses START, then PC-DMIS does not print everything in between.

Also if a PRINT/REPORT command uses START and then your very next print report command uses END, the second printing is empty, because the first print report command has cleared the report buffer.

TO_FILE= Use this option to indicate whether the printed report should be sent to a file (ON) or not (OFF).

TOG1 This value controls the action taken when sending the print output to an .rtf, .pdf, or .txt file. The options available are APPEND / OVERWRITE / AUTO / PROMPT. Depending on the option selected, different information may appear.

APPEND
Use this option to append report information to the specified filename. When the APPEND option is selected, this keyword is followed by a filename field, for example, APPEND=D:\REPORTS\FILE001.RTF. Note that the complete path must be specified; otherwise, PC-DMIS assumes the same directory as the measurement routine. Also, if the file does not exist, it is created when the PRINT/REPORT command is executed.

OVERWRITE
Use this option to overwrite report information to the specified filename. When the OVERWRITE option is selected, this keyword is followed by a filename field, for example, OVERWRITE=D:\REPORTS\FILE001.RTF. If the file does not exist, it is created when the PRINT/REPORT command is executed. If you don't provide a pathway, it defaults to the measurement routine's folder. If there is no path in this field, you can set this to a variable name (see the example below).

AUTO
Use this option to have PC-DMIS generate the report filename automatically. When the AUTO option is selected, this keyword is followed by a numeric field, for example, AUTO=10. The name of the generated filename has same name as the measurement routine, appended by the numerical index and an .rtf extension. Also, the generated file is sent to the same directory as the measurement routine. If a file exists with the same name as the generated filename, AUTO increments the index until a unique filename is found.

PROMPT
Use this option to cause a Save As dialog box to appear that asks the operator for the filename to which the report information is be written.

AUTO OPEN= Use this option to determine whether PC-DMIS opens the generated .rtf, .pdf, or .txt file after the PRINT/REPORT command executes. This can be ON or OFF.

TO_PRINTER= Use this option to indicate whether to send the report to the printer (ON) or not (OFF).

COPIES= This value determines the number of report copies to send to the printer.

TO_DMIS_REPORT= Use this option to determine whether or not PC-DMIS sends the report to a DMIS Output file (.dmo) specified in FILENAME. This can be ON or OFF.

FILENAME= Use this option to specify a DMIS output directory location and filename. If TO_DMIS_REPORT is set to ON then PC-DMIS stores the report data in the file specified. For example, if FILENAME=D:\PCDMISREPORTS\MYDMIS.DMO, PC-DMIS causes the report data to be saved in the MYDMIS.dmo file in a PCDMISREPORTS folder on drive D. If you don't provide a pathway, it defaults to the measurement routine's folder. If there is no path, you can set this to a variable name.

FILE_OPTION=TOG2 You can set TOG3 to the following file options for your DMIS file output:

APPEND
This appends the report data to the end of the DMIS file specified in FILENAME.

OVERWRITE
This overwrites the DMIS file specified in FILENAME with the latest report data.

INDEX
This appends to the DMIS filename specified in FILENAME a numerical value that increments on subsequent measurement routine executions. For example, if FILENAME=MYDMIS.DMO, on the next execution the filename increments by one, becoming mydmis001.dmo, mydmis002.dmo, mydmis003.dmo, and so on, similar to the AUTO= option.

REPORT_THEORETICALS= This tells how PC-DMIS reports theoretical values in the DMIS output file.

ALL
PC-DMIS outputs all theoretical values along with the measured values to the output DMIS file.

NONE
No theoretical values are included in the report.

IMPORT_SETTINGS
Only those theoretical values explicitly output by the original DMIS file are output in the report.

REPORT_FEATURE_WITH_DIMENSIONS= This determines whether or not PC-DMIS keeps the measured features and associated tolerances together in the output file. It takes either YES or NO.

YES
In the DMIS report file, PC-DMIS writes the measurement results immediately before their associated tolerance results for each dimension associated to the feature itself. If a feature is not associated with any tolerance, PC-DMIS does not generate any output.

NO
In the DMIS report file, PC-DMIS writes the measurement results exactly when the feature is measured, but not later when PC-DMIS executes the associated dimensions.

TO_EXCEL= This determines whether or not PC-DMIS sends the output to a Microsoft Excel file. It takes either ON or OFF.

ON
An Excel file is generated for all the items in the measurement routine to this point.

OFF
No Excel file is generated by this print command.

To modify Excel output options, press F9 on this command and modify the options in the Excel tab.

Additional Notes:

- If this is set to ON, but the measurement routine's Output Configuration dialog box has the Excel output check box cleared, PC-DMIS generates the Excel for this specific command only.

- If this is set to OFF, but the measurement routine's Output Configuration dialog box has the Excel output check box marked, an Excel file is generated at the very end of the execution.

- If this is set to ON, and the measurement routine's Output Configuration dialog box has the Excel output check box also marked, you may end up with two generated output files, one for each. In this case, dimensions that follow a PRINT/REPORT command are generated in a different file.

- Looping is supported with the Excel output. If you run the PRINT/REPORT command through a loop and the Excel output is set to append, it generates the content as additional worksheets inside the Excel file.

- To change the number of decimal places for the Excel output file output, you can insert a DISPLAYPRECISION command just before the PRINT/REPORT command.

TOG3= This value controls the action taken when sending the print output to an Excel file (.xls, .xlsx, csv). For information on the toggle options, refer to the similar TOG1 item above.

FILENAME= Use this option to specify the output directory location and filename for the Excel file. If TO_EXCEL_OUTPUT is set to ON, then PC-DMIS stores the report data in the file specified. For example, if FILENAME=D:\PCDMISREPORTS\MYEXCEL.XLS, PC-DMIS causes the report data to be saved in the MYEXCEL.xls file in a PCDMISREPORTS folder on drive D. If you don't provide a pathway, it defaults to the measurement routine's folder. If there is no path in this field, you can set this to a variable name (see the example below).

AUTO OPEN= Use this option to determine whether PC-DMIS opens the generated Excel file (.xls, .xlsx, .csv) after the PRINT/REPORT command executes. This can be ON or OFF.

PREVIOUS_RUNS= Use this with a PRINT/REPORT command from within a loop. When a feature is measured more than once in a single execution, previous instances of that feature's measured data are saved. You can choose to delete (DELETE_INSTANCES) or keep (KEEP_INSTANCES) these instances.

Variable for FILENAME

In this example, a variable of V1 takes the value of the Input comment stored in C1.INPUT. Then the FILENAME statement for the Excel output uses the value of variable V1 for the Excel file's folder and filename:

C1=COMMENT/INPUT,YES,FULL SCREEN=NO,

Type your Excel report pathway and file name:

ASSIGN/V1=C1.INPUT

PRINT/REPORT,EXEC MODE=END,$

TO_FILE=OFF,AUTO=1,AUTO OPEN=OFF,$

TO_PRINTER=OFF,COPIES=1,$

TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$

REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$

TO_EXCEL=ON,OVERWRITE,FILENAME=V1,AUTO OPEN=ON,$

PREVIOUS_RUNS=DELETE_INSTANCES

For example, if the operator typed D:\Temp\MyReport.xls in the Input comment, PC-DMIS would save the excel data to that directory and report name.