hexagon logo

Setting a Default for Report Window Printing

I have multiple operators creating/running programs that are stored on a network drive and understand that the report window print setup, by default, will 'print" the pdf report to the measurement routine folder with the program name and an index value. What we would like to do is override that in some way, for example:
Let say the default measurement routine directory is set to "S:\CMM_Programs".
When printing the report, we would like to have it automatically point the operator to a synced SharePoint file, lets call it "C:\users\(user name)\(SharePoint site)\CMM_Reports". The only thing they would need to do is find the existing part number folder, or create a new folder if one doesn't yet exist.
Now, I know we can do that by changing the file path in the report window print setup configuration, however that would need to be done for each program, either new or existing, due to the defaults defined in "set Search Path", and trying to have them use a program template with default print commands or having them "prompted" each time would be cumbersome at best.
I already have the desired SharePoint library synced to each of their user ID's, so I just need to know if we can set something like a "default measurement report directory" to point them there, regardless of where the measurement routine is stored. Thanks
Parents
  • 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
    
Reply
  • 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
    
Children
No Data