Print command not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Print command not working

    Hi all......


    today I tried the print command for the first time, everything seems like correct but still its not woring.

    It is not getting saved in the location which i defined, instead of that its storing some other location.
    i want to save my reports in "C:\Reports\customer_name\Part_number\Lot_numb er" in the format of Part_number__ddmmyyyy__variant.pdf
    if the operator enters new lot number means pc-dmis should create a new folder by itself.

    here my code is , if there is any mistake pls correct me.
    thanks in advance.


    Code:
    "header section"
    
    C1         =COMMENT/INPUT,YES,FULL SCREEN=NO,
                ENTER PART NUMBER
    C2         =COMMENT/INPUT,YES,FULL SCREEN=NO,
                ENTER JOB ROUTER NUMBER
    C3         =COMMENT/INPUT,YES,FULL SCREEN=NO,
                ENTER CUSTOMER NAME
                ASSIGN/PART_NUM=C1.INPUT
                ASSIGN/LOT_NUM=C2.INPUT
            ASSIGN/CUST_NAME=C3.INPUT    
                ASSIGN/DATE=GETPROGRAMINFO("DATE")
                ASSIGN/VARIANT=GETPROGRAMINFO("STATSCOUNT")
    
    
    
    
    "at the end of the prograrm"
    
                 ASSIGN/FILE_NAME=PART_NUM+"__"+DATE+"__"+VARIANT+".PDF"
                ASSIGN/REPORT_PATH="C:\REPORT\CUST_NAME\PART_NUM\LOT_NUM\\"
                ASSIGN/REPORT=REPORT_PATH+FILE_NAME
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,OVERWRITE=REPORT,$
                  TO_PRINTER=OFF,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME="",$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  PREVIOUS_RUNS=DELETE_INSTANCES

  • #2
    Try this.....


    Code:
    "header section"
    
    C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    ENTER PART NUMBER
    C2 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    ENTER JOB ROUTER NUMBER
    C3 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    ENTER CUSTOMER NAME
    ASSIGN/PART_NUM=C1.INPUT
    ASSIGN/LOT_NUM=C2.INPUT
    ASSIGN/CUST_NAME=C3.INPUT
    ASSIGN/DATE=GETPROGRAMINFO("DATE")
    ASSIGN/VARIANT=GETPROGRAMINFO("STATSCOUNT")
    
    
    
    "at the end of the
    
    
    ASSIGN/FILE_NAME=PART_NUM+ "__" +DATE+ "__" +VARIANT +".PDF"
    ASSIGN/REPORT_PATH="C:\\REPORT\\" +CUST_NAME + "\\" + PART_NUM +"\\" + LOT_NUM +"\\" 
    
    
    
    ASSIGN/REPORT=REPORT_PATH+FILE_NAME
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,OVERWRITE=REPORT,$
    TO_PRINTER=OFF,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME="",$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
    PREVIOUS_RUNS=DELETE_INSTANCES
    [/QUOTE]
    Last edited by dph51; 06-23-2017, 01:24 PM. Reason: Corrections

    B&S CHAMELEON/PCDMIS CAD++ V2011

    There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

    sigpic

    Comment


    • #3
      Print commands are funny, on my end, if the print under the file dropdown is not turned on and set to a bogus dummy output, the print command in the edit window wont function. May not apply to you cuz it actually outputting it not the issue but location.

      When in doubt of variable values hover over them and you can see variable output or use the ol' poor mans debugger trick, Operator comments.
      PcDmis 2015.1 SP10 CAD++
      Global 7-10-7 DC800S

      Comment


      • #4
        i changed my code as dph51 said now the command is OK, but sad thing is still the report was storing in program location

        Comment


        • #5
          What is the mistake i'm doing ? still, my Reports are getting stored in Program Location


          Code:
            ASSIGN/FILE_NAME=PART_NUM+"__"+DATE+"__"+TIME+"__"+VARIANT+".PDF"
                          ASSIGN/REPORT_PATH="C:\\REPORT\\CUST_NAME\\"+PART_NUM+"\\"+LOT_NUM+"\\"
                          ASSIGN/REPORT=REPORT_PATH+FILE_NAME
                         PRINT/REPORT,EXEC MODE=END,$
                        TO_FILE=ON,OVERWRITE=REPORT,$
                        TO_PRINTER=OFF,$
                        TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME="",$
                        REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                        PREVIOUS_RUNS=DELETE_INSTANCES

          Comment


          • #6
            Maybe PC-DMIS gets confused with your variable name "REPORT", as that's a built-in name?
            AndersI
            SW support - Hexagon Metrology Nordic AB

            Comment


            • #7
              AndersI , Still it continues. after Changing the variable name as well as folder name.
              Code:
                ASSIGN/FILENAME=PART_NUM+"__"+DATE+"__"+TIME+"__"+VARIANT+".PDF"
                          ASSIGN/FILESTORE="C:\\CUST_NAME\\FQR\\"+PART_NUM+"\\"+LOT_NUM+"\\"
                          ASSIGN/VAL_FILE=FILESTORE+FILENAME
                          PRINT/REPORT,EXEC MODE=END,$
                            TO_FILE=ON,OVERWRITE=VAL_FILE,$
                            TO_PRINTER=OFF,$
                            TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME="",$
                            REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                            PREVIOUS_RUNS=DELETE_INSTANCES
              Last edited by Thiyagu_Raj; 06-28-2017, 05:32 AM.

              Comment


              • #8
                Dumb question - does the folder "C:\\CUST_NAME\\FQR"+PART_NUM+""+LOT_NUM+"" exist? The print command can only create files, not folders.

                Edit: The forum eats backslashes, but I wrote it exactly as your post displayed it.
                Edit 2: Every time I edit some more backslashes are eaten!
                AndersI
                SW support - Hexagon Metrology Nordic AB

                Comment


                • #9
                  AndersI Have some of mine:

                  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\

                  PC-DMIS CAD++ 2o18 R2 SP5

                  Comment


                  • #10
                    Maybe this is the problem that needs to be changed. Your post showed

                    ASSIGN/REOPRT_PATH="C:\\REPORT\\CUST_NAME...........etc

                    Originally posted by Thiyagu_Raj View Post
                    What is the mistake i'm doing ? still, my Reports are getting stored in Program Location


                    Code:
                     ASSIGN/FILE_NAME=PART_NUM+"__"+DATE+"__"+TIME+"__"+VARIANT+".PDF"
                    ASSIGN/REPORT_PATH="C:\\REPORT\\+ CUST_NAME +"\\" +PART_NUM+"\\"+LOT_NUM+"\\"
                    ASSIGN/REPORT=REPORT_PATH+FILE_NAME
                    PRINT/REPORT,EXEC MODE=END,$
                    TO_FILE=ON,OVERWRITE=REPORT,$
                    TO_PRINTER=OFF,$
                    TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME="",$
                    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                    PREVIOUS_RUNS=DELETE_INSTANCES

                    B&S CHAMELEON/PCDMIS CAD++ V2011

                    There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

                    sigpic

                    Comment


                    • vpt.se
                      vpt.se commented
                      Editing a comment
                      Code:
                      assign/report_path="c:\\report\\"+ cust_name +"\\" +part_num+"\\"+lot_num+"\\"

                  • #11
                    Try running your PC-DMIS application as Administrator.

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X