Code Red > AutoLISP (Vanilla / Visual)

Help - Print Lisp

(1/3) > >>

Biscuits:
This is part of an old print routine routine that was working great until we got a new printer with new drivers.
I need to replace "LETTER" with  "LETTER (8.5 x 11)".
Problem is that the parentheses mess up the routine. Any ideas?


--- Quote ---
     (SETQ PSIZ   "LETTER"
      PORT   "LANDSCAPE"
      PSTN   "MINE.CTB"
     )
--- End quote ---
Thanks

Kerry:
Is this what you want ?


--- Code: ---(SETQ PSIZ "LETTER (8.5 x 11)"
      PORT "LANDSCAPE"
      PSTN "MINE.CTB"
)
--- End code ---

Biscuits:
Doesn't work Kerry.

"letter" substitutes the established variable (PSIZ).
"LETTER (8.5 x 11)" is what the new printer driver now requires at the command line (not lisp), but if I put "LETTER (8.5 x 11)" into the routine, the additional parentheses messes up the routine.

Hope I'm making sense.


--- Quote ---(DEFUN C:ZPLOT (/ LPGE NOFP OFRM PORT PRTR PSIZ PSTN STDP VNAM)
              ; DEFUN C:ZPLOT WITH VARIABLES FOR
              ; LPGE = LAST PAGE TO PLOT
              ; NOFP = NAME OF PRINTER
              ; OFRM = OUTPUT FORMAT
              ; PORT = PLOT ORIENTATION (LANDSCAPE OR
              ;        PORTRAIT)
              ; PRTR = PRINTER TO USE (BY AREA)
              ; PSIZ = PAPER SIZE (11X17 OR LETTER)
              ; PSTN = PLOT STYLE TABLE NAME
              ;        (LOZIER.CTB OR LOZIERII.CTB)
              ; STDP = STANDARD PLOT
              ; VNAM = VIEW NAME ( 1, 2, 3,.........20)
  (SETVAR "CMDECHO" 0)
  (INITGET "E T D")
  (SETQ   PRTR (GETKWORD (STRCAT "\nPlot to printer in "
                "Engineering/meTal/wooD. [E/T/D] "
                "<meTal>: "
             )
        )
  )              ; REQUEST PRINTER TO USE (PRTR)
  (COND
    ((EQUAL PRTR "E")
     (SETQ NOFP "MODFT2_HP5SI")
    )
    ((EQUAL PRTR "D")
     (SETQ NOFP "MODFT1_HP4V")
    )
    ((OR
       (NULL PRTR)
       (EQUAL PRTR "T")
     )
     (SETQ NOFP "MODFT1_HP5SI")
    )
  )
  (INITGET "V H B")
  (PRINC "\nChoose format for output: ")
  (SETQ
    OFRM (GETKWORD (STRCAT "\naVertical/aHorizontal/Bsize "
            "[V/H/B] <Bsize>: "
         )
    )
  )              ; REQUEST OUTPUT FORMAT (OFRM)
  (COND              ; BEGIN OUTPUT FORMAT TEST CONDITIONS
    ((EQUAL OFRM "V")        ; OFRM = AVERTICAL?
     (SETQ PSIZ   "LETTER)"
      PORT   "PORTRAIT"
      PSTN   "MINEII.CTB"
     )
    )
    ((EQUAL OFRM "H")        ; OFRM = AHORIZONTAL?
     (SETQ PSIZ   "LETTER)"
      PORT   "LANDSCAPE"
      PSTN   "MINEII.CTB"
     )
    )
    ((OR           ; OFRM = NULL OR BSIZE?
       (NULL OFRM)
       (EQUAL OFRM "B")
     )
     (SETQ PSIZ   "11X17"
      PORT   "LANDSCAPE"
      PSTN   "WOOD.CTB"
     )
    )
  )              ; END OUTPUT FORMAT TEST CONDITIONS
  (INITGET (+ 2 4))
  (SETQ VNAM (GETINT "\nEnter first View Name to plot <1>: "))
  (IF (NULL VNAM)
    (SETQ VNAM 1)
  )
  (INITGET (+ 2 4))
  (SETQ LPGE (GETINT "\nEnter last View Name to plot <1>: "))
  (IF (NULL LPGE)
    (SETQ LPGE 1)
  )
  (WHILE           ; BEGIN PLOT WHILE
    (<= VNAM LPGE)
     (COMMAND "-PLOT"  "YES"   "MODEL"    NOFP     PSIZ      "INCHES"
         PORT     "NO"   "VIEW"    VNAM     "FIT"      "CENTER"
         "YES"    PSTN   "YES"    "NO"     "NO"      "NO"
         "YES"
        )
     (SETQ VNAM (1+ VNAM))
  )              ; END PLOT WHILE
  (SETVAR "CMDECHO" 1)
  (PRINC "\nPlotting Complete. ")
  (PRINC)
)
--- End quote ---

Kerry:
Can you do a plot completely at the command line and post back the command line text .. please

CAB:
It may not be the parentheses but the space after letter.

Navigation

[0] Message Index

[#] Next page

Go to full version