hexagon logo

Cell expressions in the header.

I need help... What cell expression should I add to get JOB NUMBER and PART NUMBER?

Thank you!

  • Yes, you can make it a subroutine. Or you can just remember to paste in these details before each program and use a more unique variable than "V1" incase you already are using them in other programs.

    PARTNUM

    JOBNUM

    OPERATORNUM

    Although I don't think PC-DMIS likes when you paste in assign statements.

    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter Part Number
    C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter Job Number
    C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter Operator ID Number
                ASSIGN/V1=C1.INPUT
                ASSIGN/V2=C2.INPUT
                ASSIGN/V3=C3.INPUT

  • I was messing with this more today, and we have part numbers that start with 0's. I converted the value to a string so it retains the 0's at the beginning of my number sequences. So you just add STR() around your variable statement.

    = "Part Number: " + STR(VARIABLE("V1"))
    
    = "Job Number: " + STR(VARIABLE("V2"))
    
    = "Operator Number: " + STR(VARIABLE("V3"))

    Anyone else who may stumble upon this, if you wish to use different variables just replace the V1, V2, and V3 variable names. They must be in quotes within the lambda expression

    VARIABLE("PARTNUM")

    VARIABLE("JOBNUM")

    VARIABLE("OPNUM")

  • I know about this zero. and I did what you wrote now, but I messed something up and I have to start over... but thank you for every idea!

  • Not a problem. No biggie if you made a mistake, you've already done it once

  • We used a tracefield for the operator to fill in their name on the report. Sadly that was setup by my coworker and I have no idea how it was done. 

  • I also tried Trace Field and it looks great, Thank you  . Looks very professional. I save this as a SUB routine. I added it into other programs, everything is fine, the problem is that nothing appears in the header when I run the program. I am filling in the data in the Trace Field that I created in sub routine, but the header does not show it.
    If I add Trace Field separately to each program, everything is fine.

    I don't know, maybe I'm making a mistake. 

    I'll be playing with this later today.

  • If you do Tracefield, that data is preset, so it becomes a list of items. Does that work for what you want to do? I use Tracefields, but only for things like ArkansasBeeper said, operator. We use operator and part number, job number is always changing and can't be logged this way.

    If all your information is always the same, then I also would have suggested tracefield, and not manual inputs. Sorry about that.

  • There is 2 ways to go about this I can think off right now

    1. Inside the Tracefield window, set preset parameters of all possible Operator ID's/Operator Names
    
    TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Select Operator ID ; Operator Number : Operator
    
    2. Let them manually input the data which can cause user error such as typos. So you'd have to create 
    flow control statements to prevent this.
    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
    Enter Operator Name
    TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Select Operator ID ; Operator Number : C1.INPUT
    

    Option 1 has the most control, and prevents any possible error, except for selecting the wrong name. This works well if you have a reliable work team. But does not work well with things that are always changing, like at my workplace. Job numbers are always different. This would not work well. So you'd need to do option 2, but not use any form of error detection except for maybe preventing too many digits or not letting a job number end in anything other than 0.

    Option 2 is a freeform input field that you'll have to control with IF, ELSE, CASE, SWITCH or any other type of flow control.

    As far as placing this information into your report, you can make a copy of the header label template, then modify the cell you wish to import the data into.

    Cell would be =TRACEFIELD(1) assuming this is your first tracefield you're pulling from, if it's the second tracefield, simply change it to =TRACEFIELD(2)

  • Thank you for quick response... I'm grateful for every idea!

    In my work, the data also changes often, but the advantage is that I am the only one who creates and runs CMM.