Author Topic: malformed list on input  (Read 4190 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
malformed list on input
« on: July 16, 2009, 04:10:05 PM »
simple routine:

Code: [Select]
(defun c:dws (/)

  (setvar "osmode" 0)

  (setq pwr_hds (ssget "x" '((0 . "SOLID") (8 . "PRWIRE,LTWIRE"))))
  (setq cnt 0)
  (repeat (sslength pwr_hds)
    (setq ent (entget (ssname pwr_hds cnt))
  b (cdr (assoc 11 ent))
  c (cdr (assoc 12 ent))
  )

    (entmake
      (list '(0 . "INSERT")
    (assoc 8 ent)
    '(100 . "AcDbBlockReference")
    '(2 . "ar_head")
    (cons 10 (mapcar '(lambda (x y) (* (+ x y) 0.5)) b c))
    (cons 50
  (angle (mapcar '(lambda (x y) (* (+ x y) 0.5)) b c)
(cdr (assoc 10 ent))
  )
    )
      )
    )
    (setq cnt (+ 1 cnt))
  )
)

it runs on my autocad 2000, but when I send it to a friend he gets "malformed list on input".
we have it narrowed down to the list command in entmake, but I am stymied.

I think he runs 2009. have they maybe disallowed using the quote in some new version of autolisp?
 :ugly:
Never express yourself more clearly than you are able to think.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: malformed list on input
« Reply #1 on: July 16, 2009, 04:13:56 PM »
Loads fine for me in '06.  Maybe the just didn't copy the whole code, or the lisp file isn't complete ( if they loaded it from a lisp file ).
Tim

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

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: malformed list on input
« Reply #2 on: July 16, 2009, 04:25:37 PM »
if you suspect it is the single quote, you can always replace it with (quote ( .... ))
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

curmudgeon

  • Newt
  • Posts: 194
Re: malformed list on input
« Reply #3 on: July 16, 2009, 04:34:37 PM »
if you suspect it is the single quote, you can always replace it with (quote ( .... ))

thanks
I sent him a couple of new lisp files where I replaced the single quote with a cons statement, for him to try.
and I have asked him to send me the cad file it failed in.

while on the phone, we went through the entmake list line by line, and he got the appropriate stuff returned to the console.
but the entire list command still gets the error message. wish I were standing over his shoulder.
maybe this is one where a good reboot of the system will put it all in the past.
 :lmao:
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12927
  • London, England
Re: malformed list on input
« Reply #4 on: July 16, 2009, 04:34:46 PM »
I find that malformed list on input usually means a missed ")"  :-)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: malformed list on input
« Reply #5 on: July 16, 2009, 04:36:28 PM »
Why not have him open the lisp in the VLIDE editor and check for missing parenthesis?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

curmudgeon

  • Newt
  • Posts: 194
Re: malformed list on input
« Reply #6 on: July 16, 2009, 04:45:12 PM »
Why not have him open the lisp in the VLIDE editor and check for missing parenthesis?

been there, did that. waiting for response from the other end.
I even resent the original file in case bad fingers erased a parenthesis on his end.

he first tried copying to the command line, and maybe he will have to reload everything before the error clears.
Never express yourself more clearly than you are able to think.