Issue Solved
Solution-->
__________________________________________________ __________________________________________________ ________________________________
Original Post-->
I have a SERIAL NUMBER and RUN NUMBER being collected with input comments. I need to display these values on my inspection report AS WELL AS use these values to create a file path for the PDF that this inspection report will make. The office REQUIRES that I have leading zeroes on all paperwork. If it says "Run Number 0010" on the Insp. Report then "0010" MUST be in the filepath.
Using below, I have PC DMIS successfully & handling the leading zero thing on the Insp. Report side. However, when making the PDF, PC DMIS REMOVES the leading zeroes on the filepath that it creates. Bob the operator types in "10", PC DMIS corrects it like I want to put "0010" on the inspection report... but the PDF file gets named "AG01234_567__TCWKALXXXX__10-001". I want it to be "AG01234_567__TCWKAL1432__0010-001".
I know I'm close but still no cigar, any ideas? Here is what i have so far.
Solution-->
Code:
GROUP_SERIALNUMBER=GROUP/SHOWALLPARAMS=YES SERIALNUMBERQUESTION =COMMENT/INPUT,NO,FULL SCREEN=NO, Serial Number: ASSIGN/VAR_SERIALNUMBER="Serial Number: "+SERIALNUMBERQUESTION.INPUT COMMENT/REPT, COMMENT/REPT, VAR_SERIALNUMBER COMMENT/REPT, RUNNUMBERQUESTION =COMMENT/INPUT,NO,FULL SCREEN=NO, Run Number: IF_GOTO/RUNNUMBERQUESTION.INPUT<1 OR RUNNUMBERQUESTION.INPUT>9999,GOTO = RUNNUMBERQUESTION ASSIGN/VAR_RUNNUMBER=FORMAT("%04d",INT(RUNNUMBERQUESTION. INPUT)) ASSIGN/VAR_RUNNUMBER_STATEMENT="Run Number: "+VAR_RUNNUMBER COMMENT/REPT, VAR_RUNNUMBER_STATEMENT COMMENT/REPT, ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME") ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\DELETEME\\"+PROG_NAME+"__"+SERIALNUMBERQUEST ION.INPUT+"__"+VAR_RUNNUMBER+"-.PDF" PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$ TO_PRINTER=OFF,COPIES=1,$ TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=REPO RT_NAME,$ REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$ TO_EXCEL=OFF,$ PREVIOUS_RUNS=KEEP_INSTANCES ENDGROUP/ID=GROUP_SERIALNUMBER
Original Post-->
I have a SERIAL NUMBER and RUN NUMBER being collected with input comments. I need to display these values on my inspection report AS WELL AS use these values to create a file path for the PDF that this inspection report will make. The office REQUIRES that I have leading zeroes on all paperwork. If it says "Run Number 0010" on the Insp. Report then "0010" MUST be in the filepath.
Using below, I have PC DMIS successfully & handling the leading zero thing on the Insp. Report side. However, when making the PDF, PC DMIS REMOVES the leading zeroes on the filepath that it creates. Bob the operator types in "10", PC DMIS corrects it like I want to put "0010" on the inspection report... but the PDF file gets named "AG01234_567__TCWKALXXXX__10-001". I want it to be "AG01234_567__TCWKAL1432__0010-001".
I know I'm close but still no cigar, any ideas? Here is what i have so far.
Code:
SERIALNUMBERQUESTION =COMMENT/INPUT,NO,FULL SCREEN=NO, Serial Number: ASSIGN/VAR_SERNO=SERIALNUMBERQUESTION.INPUT ASSIGN/VAR_SERIALNUMBER_STATEMENT="Serial Number: "+SERIALNUMBERQUESTION.INPUT COMMENT/REPT, COMMENT/REPT, VAR_SERIALNUMBER_STATEMENT COMMENT/REPT, RUNNUMBERQUESTION =COMMENT/INPUT,NO,FULL SCREEN=NO, Run Number: ASSIGN/V1=ABS(RUNNUMBERQUESTION.INPUT) IF/V1<10 ASSIGN/VAR_RUNNUM=STR(0)+STR(0)+STR(0)+V1 END_IF/ IF/V1>9 AND V1<100 ASSIGN/VAR_RUNNUM=STR(0)+STR(0)+V1 END_IF/ IF/V1>99 AND V1<1000 ASSIGN/VAR_RUNNUM=STR(0)+V1 END_IF/ IF/V1>999 AND V1<9999 ASSIGN/VAR_RUNNUM=V1 END_IF/ IF/V1>9999 ASSIGN/VAR_RUNNUM="Run numbers don't go that high! Try again." COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, VAR_RUNNUM GOTO/RUNNUMBERQUESTION END_IF/ COMMENT/REPT, "Run Number: "+VAR_RUNNUM COMMENT/REPT, ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME") ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG01234_567\\"+PROG_NAME+"__"+VAR_SERNO+"__" +VAR_RUNNUM+"-.PDF"
Code:
PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$ TO_PRINTER=OFF,COPIES=1,$ TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=REPORT_NAME,$ REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$ TO_EXCEL=OFF,$ PREVIOUS_RUNS=KEEP_INSTANCES
Comment