hexagon logo

Serialize pdf's

I need to have the pdf printed at the end of the run of a program serialized to a specific serial number input via an operator comment at the beginning of the run of the program. Any thoughts?

I am running PC-DMIS 2010 but anything that works from PC-DMIS 3.2063 up to PC-DMIS 2010 should work.

Thanks for any help you folks can provide. This place is a great resource for us new guys.
  • Yeah I know. I've been thinking on that too. It's gonna have to be controlled at the operator input I guess.


    At our last production meeting, Shock collars was brought up as a possible way to control the operators
  • At our last production meeting, Shock collars was brought up as a possible way to control the operators


    I tried one of those once...
  • I tried one of those once...


    it was one of the best nights of my life.
  • To find inpermissible characters from within PC-DMIS, read the following, and then thank Jared. Not Subway Jared. Our Jared.

    I think a script would do this much more quickly, but here's a solution for only inside of PC-DMIS if you don't want to mess with scripts.


    • Operator is asked to input a name.



    • Invalid characters are assigned to an array.



    • Using nested loops each character of the submitted string is then compared against each element of the array.



    • If a match is found it details where it was found and then goes back to the input.

    The longer the string, the longer it takes to execute. The longer the list of invalid characters, the longer it takes to execute.

    I would hazard a guess that the code gurus here could come up with a cleaner more efficient way. Rolling eyes

    $$ NO,====================INPUT VALIDATION=================
    GETINPUT   =LABEL/
    C1         =COMMENT/INPUT,NO,'Type a Name:'
    $$ NO,======DEFINE VARIABLES=========
                ASSIGN/BADCHARS=ARRAY("!","@","#","$","%","^","&","*","<",">","?","`","~","(",")","[","]",":",";",",","-","_","=","/","|","{","}","\\")
                ASSIGN/VAR_STRING=C1.INPUT
                ASSIGN/VAR_COUNTER=1
                ASSIGN/VAR_LENGTH=LEN(VAR_STRING)
    $$ NO,======BEGIN FIRST LOOP TO CYCLE THROUGH INPUT STRING =========
                WHILE/VAR_COUNTER <= VAR_LENGTH
                ASSIGN/VAR_CHAR=MID(VAR_STRING,VAR_COUNTER-1,1)
                ASSIGN/ELEMENT_NUMBER=1
    $$ NO,======BEGIN SECOND LOOP TO COMPARE CHAR AGAINST ARRAY ELEMENTS =========
                DO/
                ASSIGN/V1=BADCHARS[ELEMENT_NUMBER]
                IF/VAR_CHAR==V1
                COMMENT/OPER,NO,"Invalid character of " + VAR_CHAR + " at position " + VAR_COUNTER + " in the input of " + VAR_STRING
                GOTO/GETINPUT
                PROGRAM/END
                END_IF/
                ASSIGN/ELEMENT_NUMBER=ELEMENT_NUMBER + 1
                UNTIL/ELEMENT_NUMBER > LEN(BADCHARS) 
    $$ NO,======END SECOND LOOP =========
                ASSIGN/VAR_COUNTER=VAR_COUNTER+1
                END_WHILE/
    $$ NO,======END FIRST LOOP =========
                COMMENT/OPER,NO,"The string of " + VAR_STRING + " passed validation."
    $$ NO,===================END VALIDATION CODE====================
    
  • I tried one of those once...



    Didn't accomplish what you wanted did it?
    You kept saying, "enter the wrong number again and you'll get shocked...".
    Why did you get mad when I entered the wrong number?
  • Didn't accomplish what you wanted did it?
    You kept saying, "enter the wrong number again and you'll get shocked...".
    Why did you get mad when I entered the wrong number?


    had nothing to do with numbers... or clothes, or respect or love... it was raw animal attraction.