hexagon logo

Printing reports with serial # as file name.

I output a PDF report for every part I check and I currently use auto indexing to name them. There is a report comment at the beginning of the program that asks for the serial # of the part. I was wondering if it's possible to instead have PC DMIS automatically add that same serial # to the end of the file name instead of the index #. This would be helpful if I need to find the report for a specific piece later. I know I could just manually type it in each time. I'm just looking for a more efficient method since the serial #'s are often over 20 characters and I never remember what it was at the end of the program and I'd rather not take it off the machine before viewing the report in case I need to remeasure something. Am I asking too much here?
Parents
  • Try this. If you are looping your program, this code must be inside loop, at the beginning.

    C5         =COMMENT/INPUT,YES,FULL SCREEN=NO,
                Serial Number
                ASSIGN/SER_NUM=C5.INPUT​


    Add a Print Command at the end of the loop and F9 on the Report Command. In the Report tab, check the Report output box, click on the drop-down and navigate to the destination folder for the report.
    In the File name box at the bottom, type the intended name of the reports followed by an underscore(_). Ex: X4262148_
    Save and click "OK" in the Report command.

    Back in the Edit window change the "1" after AUTO to "SER_NUM"

    PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=OFF,AUTO=SER_NUM,AUTO OPEN=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL=OFF,$
                  PREVIOUS_RUNS=DELETE_INSTANCES​


    Each report will have the serial number as part of the filename.
  • The "YES" in the Comment will print the Ser Num at the top of each report.
Reply Children
No Data