Author Topic: a modified printing lisp from one of these recent entries  (Read 3069 times)

0 Members and 1 Guest are viewing this topic.

stsevedallas

  • Guest
a modified printing lisp from one of these recent entries
« 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)
)

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: a modified printing lisp from one of these recent entries
« Reply #1 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 ")

stsevedallas

  • Guest
Re: a modified printing lisp from one of these recent entries
« Reply #2 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?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: a modified printing lisp from one of these recent entries
« Reply #3 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.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

GDF

  • Water Moccasin
  • Posts: 2081
Re: a modified printing lisp from one of these recent entries
« Reply #4 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


Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64