Report path in server

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

  • Report path in server

    Hello everyone

    After completing program execution every time I saved report manually anyone suggest code please here one more problem is there report saved in server serial wise and operation wise.

    For example
    Server 2/M12/ABC12/OP130/ABC12cmm report.


    Guys I think u get my point.

  • #2
    In the Edit Window, insert a PRINT command, or INSERT - REPORT COMMAND - PRINT COMMAND at the end of the program. Toggle TO_FILE on (this will print to a file), change AUTO to APPEND (this will allow you to choose the directory and not overwrite the report every time), use variables to complete the directory name as you desire.

    For example: the second line of the PRINT command would read

    TO_FILE=ON,APPEND=SERVER2\M12\ABC12\OP130\*whateve r name you desire*.PDF,AUTO OPEN=OFF,$

    Comment


    • #3
      Every time I executed different serial number and different part at that situation I can't use same path right

      Comment


      • #4
        Originally posted by Sivakrishna View Post
        Every time I executed different serial number and different part at that situation I can't use same path right
        You can if you use variables in the path name, for example the serial number can be incorporated into the filename using an assignment. Also, with APPEND being on, you will continue to accumulate reports without overwriting the previous.

        Comment


        • #5
          This is what I use.
          Code:
          C2 =COMMENT/INPUT,NO,FULL SCREEN=NO,
          'SERIAL NUMBER'
          ASSIGN/V_SN=C2.INPUT
          ASSIGN/V_PATH="V:\CMM_REPORT\ProgramNumber_"+V_SN+".PDF"
          Then at the end.
          Code:
           PRINT/REPORT,EXEC MODE=END,$
          TO_FILE=ON,OVERWRITE=V_PATH,AUTO OPEN=OFF,$
          TO_PRINTER=OFF,COPIES=1,$
          TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
          REPORT_THEORETICALS=IMPORT_SETTING,REPORT_FEATURE_ WITH_DIMENSIONS=YES,$
          TO_EXCEL=OFF,$
          PREVIOUS_RUNS=DELETE_INSTANCES
          After you insert the print command in the program, change the path to the variable name you used, in this case "V_PATH". It will ask you if you mean the variable, answer yes.
          PC-DMIS 2016.0 SP8

          Jeff

          Comment


          • #6
            This is what I use


            Code:
            ASSIGN/PROGNAME=GETPROGRAMINFO("PARTNAME")
            ASSIGN/PROGREV=GETPROGRAMINFO("REVISION")
            ASSIGN/PROGSER=GETPROGRAMINFO("SERIALNUM")
            ASSIGN/SYSDAT=SYSTEMDATE("MM'-'dd'-'yyyy")
            ASSIGN/STIME=SYSTEMTIME("HH:mm:ss")
            ASSIGN/YEAR=RIGHT(SYSDAT,4)
            ASSIGN/V1="12.30.10"
            COMMENT/REPT,
            **************************************
            C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
            ENTER WORK ORDER NUMBER
            C2 =COMMENT/INPUT,YES,FULL SCREEN=NO,
            ENTER PART NUMBER
            C3 =COMMENT/INPUT,YES,FULL SCREEN=NO,
            ENTER SERIAL NUMBER
            ASSIGN/VAR_FILENAME="X:\\- PROGRAM REPORTS\\"+YEAR+"\\"+PROGNAME+" - "+PROGREV+" - "+PROGSER+" WO "+C1.INPUT+" SN "+C3.INPUT+"_" +SYSDAT+".PDF"
            COMMENT/REPT,
            **************************************
            COMMENT/REPT,
            "***** PART RUN ON MACHINE "+V1+" *****"
            **************************************
            I select overwrite option if it is a serialized part, otherwise i use append.
            Capture1.JPG

            Comment


            • #7
              Sivakrishna , If you are using PC-Dmis 2020 then there is an example of how to add the commands you need on the discover tab of the homepage. If you have internet access, open PC-Dmis and from the home page, click DISCOVER then select the EXAMPLE ROUTINES tab. The example you need is called REPORT ARCHIVING.
              Neil Challinor
              PC-DMIS Product Owner

              T: +44 870 446 2667 (Hexagon UK office)
              E: [email protected]

              Comment


              • gibsonridge
                gibsonridge commented
                Editing a comment
                im not seeing example routines in the discover page

              • neil.challinor
                neil.challinor commented
                Editing a comment
                You need 2020 R1 and an internet connection.

            • #8
              Guys I tried what u suggest but I got error it's not working I think I missed something can correct it.
              Attached Files

              Comment


              • #9
                neil.challinor I pasted same path in that report archive program it's not saving required location

                Comment


                • neil.challinor
                  neil.challinor commented
                  Editing a comment
                  I can't see the full path in your screen shot but try replacing all of the back slashes (\) with double back slashes (\\).

              • #10
                Z:\Quality\Quality control\inspection\21243M14\CMM\Report\21243M14\Pa rt\serial number\OP\here I want save report


                This is my report path.

                Comment


                • jtrofatter
                  jtrofatter commented
                  Editing a comment
                  The issue could be the periods and spaces in your file path in the code that you posted. PCDMIS doesnt like spaces ever, and periods tend to make it think its looking for a variable or some such. Can you alter the folder names to be separated by underscores? Like "3_Quality\2_Quality_Control\0_Inspection" might make a difference. I know it tends to make a difference in the older versions of the software i use.

              • #11
                Sivakrishna Try to do what Neil said and replace your back slashes with double back slashes. That should fix it.

                Z:\\Quality\\Quality control\\inspection\\21243M14\\CMM\\Report\\21243M 14\\Pa rt\\serial number\\OP\\

                Comment


                • #12
                  I suggest you use windows explorer and navigate to path that you want to send file to click on top file path and copy....you will see \ slash for folders \ is an indicator of a file folder \ each one is a subfolder when you want to construct your file name for full path and file name with variables and script is sensitive to characters "Z:\ REPORTS\OP_20\ ######_REV_H_OP_20_JOB_"+ORDNUM+"_PART_"+PARTNUM+" _WRK_CTR"+MACHINENUM+"_"+TIME2+".PDF" this is file path "Z:\ REPORTS\OP_20\ this is file name to save a pdf document 12345_REV_H_OP_20_JOB_"+ORDNUM+"_PART_"+PARTNUM+"_ WRK_CTR"+MACHINENUM+"_"+TIME2+".PDF" variables are in this example are ORDNUM , PARTNUM are all assigned in program and in line are between "+nnnn+", special characters in variables especially a backslash will FUBAR path check folder names looks like too many back slashes to me

                  Comment


                  • #13
                    I did use the way in a pictures. First picture where variables coming from, second picture (from C1) with printing command.
                    Now I do use is script.

                    Both ways are right, way in a pictures is easier to do, easier check but it should be in every single program so if one day you will decide that reports should be saved in other place (as example not CMM_Data but lets say CMM_REPORTS) then you need change every single program.
                    Now I'm using SCRIPT to save reports, it is more complicated and also more elegant way. Benefit of it is few lines of extra code in CMM program and on script for will work for all programs, so if one day I do need change folder CMM_Data to CMM_REPORTS, i need to do changes in one place and do not need to change any single CMM program.

                    Capture1.JPGCapture2.JPG



                    https://www.pcdmisforum.com/image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==‚Äč

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X