TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: stsevedallas on April 25, 2006, 05:05:24 PM

Title: a modified printing lisp from one of these recent entries
Post by: 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


(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)
)
Title: Re: a modified printing lisp from one of these recent entries
Post by: Jeff_M on April 25, 2006, 05:30:14 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


swap the positions of the )" to be ")
Title: Re: a modified printing lisp from one of these recent entries
Post by: stsevedallas on May 03, 2006, 12:46:52 PM
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?
Title: Re: a modified printing lisp from one of these recent entries
Post by: T.Willey on May 03, 2006, 12:56:25 PM
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.
Title: Re: a modified printing lisp from one of these recent entries
Post by: GDF on May 03, 2006, 01:39:29 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


swap the positions of the )" to be ")


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