LISP error

LISP error

Anonymous
Not applicable
319 Views
2 Replies
Message 1 of 3

LISP error

Anonymous
Not applicable

This LISP came straight out of the book

 

(c:rrc ( / arclength)
(if (= (tblsearch "layer" "RevCloud") nil)
 (command "-layer" "m" "RevCloud" "c" "1" "" "")
)
(command "rectang" PAUSE PAUSE)
(if(> (setq arclength (abs (getvar "dimscale")))1)
 (setq arclength (* arclength 2))
 (setq arclength 1.0)
)
(command "revcloud" "a" (/ arclength 2) arclength "o" (entlast) "")
(princ)
)

 

when I load it I get this error

; error: bad argument type: numberp: nil

 

Can anyone help. The book says it creates a revision cloud after drawing a rectangle. Grateful for any advise. I am just starting to learn LISP and did not expect to get an error for a LISP directly from a book.

0 Likes
320 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant

Missing (defun....

 

(defun c:rrc ( / arclength)

...

 

then it works.

0 Likes
Message 3 of 3

Anonymous
Not applicable

I can't believe I did not see that. LOL. Appreciate your help, it was driving me crazy.

0 Likes