hexagon logo

Getprograminfo

Trying to start converting our PDMIS program to output to a PDF. I've gotten all of the variables setup to store the reports based on things like part name, time, date. But I'm trying to add an if/then statement to change the file name to indicate that a dimension failed.

I've search the forums here and people are using:

ASSIGN/NUMOOT=GETPROGRAMINFO("NUMOOT")

But it always reads a 0.

I'm using v2013, is it not the correct code for this version? Am I missing something before this line? Will it always show 0 offline? (I forced a nominal to make it OOT)
Parents
  • I have this group at the end of my programs:

    GROUP_PRINT_COMMANDS=GROUP/SHOWALLPARAMS=YES
    ASSIGN/NUMOOT=GETPROGRAMINFO("NUMOOT")
    ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
    ASSIGN/DATE=STR(SYSTEMDATE ("dMMMyyyy"))
    ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
    ASSIGN/REJECT="____REJECT____"
    IF/NUMOOT=="0"
    ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"__"+DATE+"__"+TIME+"__. PDF"
    END_IF/
    ELSE/
    ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"__"+DATE+"__"+TIME+"__" +REJECT+".PDF"
    END_ELSE/
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
    TO_PRINTER=OFF,COPIES=1,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= REPORT_NAME,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=KEEP_INSTANCES
    ENDGROUP/ID=GROUP_PRINT_COMMANDS
    


    NOMOOT should work in V2013 can you share your code?
  • I have executed it, it will store the PDF in the correct location but without the file name indicating it is a _____REJECT_____ part.
Reply Children
No Data