hexagon logo

Variable in Output File Name Issue - Followed Hexagon's Guide

Hi everyone,

I'm trying to utilize a variable in my program to change the file name when outputting the report. I followed the Hexagon guide I linked to below, but if I close and reopen the program, it removes the variable name I put in the output box and replaces it with whatever it was on the previous run. Any idea why that's happening?

Edit: forgot to add, I'm using PC-DMIS CAD 2018 R2 Build#504 SP8
Edit 2: forgot code.

C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
            CMM OPERATOR
C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
            WORK ORDER
C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
            -THRU-
            ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
            ASSIGN/OP=C1.INPUT
            ASSIGN/WO=C2.INPUT
            ASSIGN/THRU=C3.INPUT
            ASSIGN/REPORT_NAME="R:\\XXXX\\XXXXX\\CMM\\"+PROG_NAME+"_"+WO+"_"+THRU+".RTF"​


{"alt":"Click image for larger version Name:\tREPORTNAME.png Views:\t0 Size:\t20.8 KB ID:\t528181","data-align":"none","data-attachmentid":"528181","data-size":"custom","height":"263","title":"REPORTNAME.png","width":"360"}​​

Output to a File Using Expressions
https://docs.hexagonmi.com/pcdmis/2022.2/en/helpcenter/mergedProjects/core/04_file_bas_topics/Output_to_a_File_Using_Expressions.htm

Parents
  • Post your code. We can't diagnose what we can't see.


    Sorry, I forgot - I will say my variables are all storing the correct value though but its the output file name box that's changing.. I enter the variable name in as indicated in the linked guide, but when I save/close/reopen it no longer has the variable name in that box but rather the full file name from the last run which seems odd.

    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                CMM OPERATOR
    C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                WORK ORDER
    C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                -THRU-
                ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
                ASSIGN/OP=C1.INPUT
                ASSIGN/WO=C2.INPUT
                ASSIGN/THRU=C3.INPUT
                ASSIGN/REPORT_NAME="R:\\XXXX\\XXXXX\\CMM\\"+PROG_NAME+"_"+WO+"_"+THRU+".RTF"​


Reply
  • Post your code. We can't diagnose what we can't see.


    Sorry, I forgot - I will say my variables are all storing the correct value though but its the output file name box that's changing.. I enter the variable name in as indicated in the linked guide, but when I save/close/reopen it no longer has the variable name in that box but rather the full file name from the last run which seems odd.

    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                CMM OPERATOR
    C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                WORK ORDER
    C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                -THRU-
                ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
                ASSIGN/OP=C1.INPUT
                ASSIGN/WO=C2.INPUT
                ASSIGN/THRU=C3.INPUT
                ASSIGN/REPORT_NAME="R:\\XXXX\\XXXXX\\CMM\\"+PROG_NAME+"_"+WO+"_"+THRU+".RTF"​


Children
No Data