PRS_SaveDoc / Adding PRC to SDB

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

  • PRS_SaveDoc / Adding PRC to SDB

    Hello.

    I am running Q7, one version last updated 2011, the other in 2017. The newer version has the PRS_SaveDoc command, which I find is the best way to output PDF and the standard command I want to use on both CMMs. I am trying to "install" the PRS_SaveDoc command to the older Q7. I am opening the SDB in newer version, viewing PRS_SaveDoc in the info box tab and copying the contents to a txt file, then copying the contents of the txt file to the command buffer in the old Q7. I am believing if I execute this, it should create the PRC in the SDB so I can use the command. However It hangs up on a CVSTRREA line, see code and grab of error.

    Code:
    !-------------------------------------------------------------------------
    ! PRC:PRS_SaveDoc
    ! modified PRC:PRS_SavePDF for creating PDF/XPS without PDFCreator
    ! 30.Jan.2014 (NR)
    ! 24.Apr.2014 (JO) remove BOO:
    ! 25.Apr.2014 (HJS) use different error message
    ! 29.Apr.2014 (HJS) adjust behavoir of PRC to Printer Server (file extension)
    !                   in case of TMO > 0
    !-------------------------------------------------------------------------
    
    ENBSYS          (NAM=CLEANUP)
    
    ~DIR$$ = ~INP$CHS(1)
    ~FIL$$ = ~INP$CHS(2)
    ~FMT$$ = ~INP$CHS(3)
    ~PGN$$ = ~INP$CHS(4)
    ~OPN$$ = ~INP$CHS(5)
    ~NAM$$ = ~INP$CHS(6)
    ~TMO$$ = ~INP$CHS(7)
    [COLOR=#FF0000]CVSTRREA        (NAM=TMO$$, STR=~TMO$$, NBR=1)[/COLOR]
    TESTQUE         (REA=Fnd$$, OBJ=CHS:~INP$CHS(8))
    IFTHEN          (VL1=Fnd$$, VL2=0, TYP=GT)
      ~CLS$$ = ~INP$CHS(8)
     ELSE
      ~CLS$$ = S
    ENDIF
    PRS_SaveDoc_error1.JPG

    Is this even a legitimate way to copy a PRC over?

    If so, any idea why this hangs up here?

    Thanks

  • #2
    Don't try to run the code directly from the command buffer, you need to create the procedure and the associated dialogue page. The list of character string variables (~DIR$$, ~FIL$$ etc) are inputs related to the dialog page and because you don't have that dialog page or inputs it is hanging up.

    In the command buffer type EDTPRC and enter the name of the procedure as shown below ( make sure you include the LDBPRC: )

    Code:
    EDTPRC          (NAM=LDBPRC:PRS_SaveDoc)
    This will open a blank command buffer into which you can paste the code from your text file before clicking the save and exit icon on the tool bar (bottom left of screen). You will also need to copy over SDBSYM:
    PRS_SaveDoc and SDBDLP:PRS_SaveDoc.

    Once you are happy that everything has copied across and is working on the older system, copy your LDB objects into the GDB so that they will be available for all wdb's. You will need to exit and re-start QUINDOS to permanently update the GDB.

    An easier way may be to simply copy all of the PRS_SaveDoc objects from the SDB to the LDB on the newer version of QUINDOS, save the wdb, and then load that wdb into the old version of QUINDOS. You can then copy the PRS_SaveDoc objects from the LDB to the GDB before closing and re-opening QUINDOS.
    Neil Challinor
    PC-DMIS Product Owner

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

    Comment


    • #3
      Thanks Neil.

      On the money as usual.

      I went for the easier option which worked perfect. Can you tell me, what exactly the SYM object type is for?

      Cheers.

      Comment


      • #4
        The SYM object (symbol) is basically how it links the QUINDOS command PRS_SaveDoc to the PRS_SaveDoc procedure. Without the SYM you would have to INDPRC to run the PRS_SaveDoc procedure.
        Neil Challinor
        PC-DMIS Product Owner

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

        Comment


        • WM321
          WM321 commented
          Editing a comment
          Cheers Neil.

      • #5
        I might have jumped the gun on this a bit. I got the PRS_SaveDoc command into our older Q7, however it does not seem to work, below is the standard code used before the command.
        Code:
        PLS_AddPagesToReport
        ~PART_NUM = 801_7022_ISSB_#
        ~DATE=_DATE
        LISCHS          (NAM=~DATE, DEV=D1)
        ~TIME=_TIME
        LISCHS          (NAM=~TIME, DEV=D1)
        CONCAT          (NAM=~RPRT, STR=(~PART_NUM,~S_N,"___ON_",~DATE,"_AT_",~TIME), INI=Y)
        WAIT            (SEC=5)
        !PRS_SavePDF     (DIR=C:\REPORTS\, FIL=~RPRT)
        PRS_SaveDoc     (DIR=C:\REPORTS\, FIL=~RPRT)
        This works fine on the newer version of Q7. There is no error message either. Any ideas?

        Comment

        Related Topics

        Collapse

        • Gleeson97
          LastUsedLDB
          by Gleeson97
          Hi,

          I'm trying to stop quindos loading up the last used ldb when i open to software. I'd like it to forget what was loaded when you close...
          11-11-2020, 07:10 AM
        • WM321
          Fatal Error / Licence issue
          by WM321
          Hey.

          Quindos 7. I came in this morning and our Leitz is throwing up a fatal error when loading the standard machine environment. The GDB...
          04-11-2018, 12:32 PM
        • t1689jm
          Q6 Version screen locks using plotting
          by t1689jm
          Why is it that windows will lock up after I have used the CUTDEVPL command. Is there no way out (like the old CTRL-Z with Unix) when this happening....
          11-13-2009, 10:51 AM
        • Hribe85
          Quindos Program Codes
          by Hribe85
          Hello everybody
          I am looking for Quindo's 7 code tricks to develop myself in the further.
          Maybe someone here has the code tricks from the...
          08-28-2020, 12:51 PM
        • t1689jm
          Windows Quindos 6 crashing
          by t1689jm
          Is there a Quindos command (like "Save") or another Windows short-cut to save programs as you go along and build a program?? (besides "save...
          11-07-2008, 07:22 AM
        Working...
        X