Your Products have been synced, click here to refresh
STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES ALIGNMENT/END TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=CMM Operator ; CMM Operator : MADISON ROLLINGS TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Job # ; Job # : XXXXXXXX TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Serial # ; Serial # : XXX TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Temperature ; Temperature : 65.9 TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Humidity ; Humidity : 31 ASSIGN/V_JN=GETTRACEVALUE("Job #") ASSIGN/V_SN=GETTRACEVALUE("Serial #") ASSIGN/V_99="\\"+V_JN MEASUREMENT ROUTINE GOES HERE PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,OVERWRITE="T:\CMM\PART #\RESULTS"+V_99+"\PART # REV # OP# "+V_JN+" SN "+V_SN+".PDF",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="T:\CMM\PART #\RESULTS"+V_99+"\PART # REV # OP# "+V_JN+" SN "+V_SN+".XLSX",AUTO OPEN=ON,$ PREVIOUS_RUNS=DELETE_INSTANCES
I use the print report command at the end of the program. I write it manually each time, but everything in it can be pulled from the program or assigned a variable. Take this, the necessary code to populate the fields, and save it to a template file that all programs are built from. In the template file turn off the report outputs in the "Report Window Print Setup" File command. You can see in my sample below I already pull the job number and serial/run number from a variable that gets plugged in a the beginning of the program. Part number and Rev can be pulled from the routine. All that is left is to standardize the file structure of where you store your programs and reports.
STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES ALIGNMENT/END TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=CMM Operator ; CMM Operator : MADISON ROLLINGS TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Job # ; Job # : XXXXXXXX TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Serial # ; Serial # : XXX TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Temperature ; Temperature : 65.9 TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Humidity ; Humidity : 31 ASSIGN/V_JN=GETTRACEVALUE("Job #") ASSIGN/V_SN=GETTRACEVALUE("Serial #") ASSIGN/V_99="\\"+V_JN MEASUREMENT ROUTINE GOES HERE PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,OVERWRITE="T:\CMM\PART #\RESULTS"+V_99+"\PART # REV # OP# "+V_JN+" SN "+V_SN+".PDF",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="T:\CMM\PART #\RESULTS"+V_99+"\PART # REV # OP# "+V_JN+" SN "+V_SN+".XLSX",AUTO OPEN=ON,$ PREVIOUS_RUNS=DELETE_INSTANCES
The destination folder doesn't exist, or the folder structure is wrong if you get the "Save As" dialog box for the report at the end of the program.
That V_99 variable takes the job number and adds it to the file path, because I sort my reports by job number. Sometimes I forget to create the job number folder in the results folder before I start the program.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |