Code Red > AutoLISP (Vanilla / Visual)

a modified printing lisp from one of these recent entries

(1/1)

stsevedallas:
I get the following error when I load this code.
I got this off of one of the boards recently and modified it to meet my needs.

Error: malformed list on input


(DEFUN C:ZPLOT (/ NOFP OFRM PRTR PSIZ )
              ; DEFUN C:ZPLOT WITH VARIABLES FOR
              ; NOFP = NAME OF PRINTER
              ; OFRM = OUTPUT FORMAT
              ; PORT = PLOT ORIENTATION (LANDSCAPE OR
              ;        PORTRAIT)
              ; PRTR = PRINTER TO USE (BY AREA)
              ; PSIZ = PAPER SIZE (Arch D OR Arch E1)
              ; PSTN = PLOT STYLE TABLE NAME
              ;        (arjo.ctb)
              ; STDP = STANDARD PLOT
  (INITGET "A B")
  (SETQ PRTR (GETKWORD (STRCAT "\nPlot to printer in "
                "HP1050C-A OR B. [A/B] "
                "<hp1050-A>: "
             )
        )
  )              ; REQUEST PRINTER TO USE (PRTR)
  (COND
    ((EQUAL PRTR "A")
     (SETQ NOFP "HP1050-A.PC3")
    )
    ((OR (NULL PRTR)
     (EQUAL PRTR "B"))
     (SETQ NOFP "HP1050-B.PC3")
    )
   )
  (INITGET "D E")
  (PRINC "\nChoose format for output: ")
  (SETQ
    OFRM (GETKWORD (STRCAT "\narchD/archE1 "
            "[D/E] <E>: "
         )
    )
  )              ; REQUEST OUTPUT FORMAT (OFRM)
  (COND              ; BEGIN OUTPUT FORMAT TEST CONDITIONS
    ((EQUAL OFRM "D")
     (SETQ PSIZ "arch d - 24 x 36 in. (portrait)")
         )
     ((OR (NULL OFRM)
     (EQUAL OFRM "E"))       
     (SETQ PSIZ "arch e1 - 30 x 42 in.)"
     )
  )              ; END OUTPUT FORMAT TEST CONDITIONS
         (COMMAND "-PLOT"  "YES"   "" NOFP PSIZ "INCHES"
         "LANDSCAPE" "NO" "extents" "1:1" "CENTER"
         "YES" "ARJO.CTB" "YES" "YES" "NO" "NO" "NO" "NO"
         "YES"
        )
  (PRINC "\nPlotting Complete. ")
  (PRINC)
)

Jeff_M:

--- Quote from: stsevedallas on April 25, 2006, 05:05:24 PM ---I get the following error when I load this code.
I got this off of one of the boards recently and modified it to meet my needs.

Error: malformed list on input


....SNIP.....
     (EQUAL OFRM "E"))       
     (SETQ PSIZ "arch e1 - 30 x 42 in.)";;THIS IS THE PROBLEM
....SNIP


--- End quote ---

swap the positions of the )" to be ")

stsevedallas:
Why is it that when this gets to the command line for the plot commands in this routine...
the plot prompts change every now and again?
I ran this just a minute ago, worked perfectly.
I ran it a little bit later, no plot.
The above is why.
Cad changed the commandline prompts, so some of my  input was off.

Ideas? Solutions?

T.Willey:
It changes the prompts per model space, and paper space.  You will have to look at each one and code for that space, and then test for the space before you plot so that it knows which set of prompts to answer.

GDF:

--- Quote from: Jeff_M on April 25, 2006, 05:30:14 PM ---
--- Quote from: stsevedallas on April 25, 2006, 05:05:24 PM ---I get the following error when I load this code.
I got this off of one of the boards recently and modified it to meet my needs.

Error: malformed list on input


....SNIP.....
     (EQUAL OFRM "E"))       
     (SETQ PSIZ "arch e1 - 30 x 42 in.)";;THIS IS THE PROBLEM
....SNIP


--- End quote ---

swap the positions of the )" to be ")

--- End quote ---


You may also need to change the paper size call out.

example: "Arch D"
(command ".plot" "y" "fullsize" "Adobe PDF.pc3" "Arch D" "i" "l" "n" "w" "1.5,1.5" "34.5,22.5" "f" "center" "y" "aia standard.ctb" "y" "y" "n" "n" "n" "n" "y")

Gary


Navigation

[0] Message Index

Go to full version