prakash Posted September 8, 2009 Posted September 8, 2009 hi can anybody help me on debugging my lisp Quote
prakash Posted September 8, 2009 Author Posted September 8, 2009 (defun c:nod() (command "setvar" "osmode" 1) (setq ss (ssget "x" (list (cons 2 "NODE")))) (setq len (sslength ss)) (setq key 0) (repeat len (setq ssn (ssname ss key)) (setq ins1 (cdr (assoc 10 (entget ssn)))) (command "zoom" "c" ins1 3000) (command "move" ssn "" ins1 pause) (setq key (+ 1 key)) ) ) Quote
ReMark Posted September 8, 2009 Posted September 8, 2009 prakash: Attaching your question to this post was not a good idea. Anyone reading the title of the thread will not be expecting to answer a question about debugging a LISP routine. You should have started a new thread. Maybe a mod will see this and correct the situation. You should have placed this in the AutoLISP forum. Quote
Cad64 Posted September 8, 2009 Posted September 8, 2009 This question has been moved to the AutoLisp section. Quote
alanjt Posted September 8, 2009 Posted September 8, 2009 first things first, localize your variables. using 1+ and 1- will give much better results when incrementing. (setq key (1+ key)) what is this supposed to be selecting? (setq ss (ssget "x" (list (cons 2 "NODE")))) (defun c:nod() (command "setvar" "osmode" 1) (setq ss (ssget "x" (list (cons 2 "NODE")))) (setq len (sslength ss)) (setq key 0) (repeat len (setq ssn (ssname ss key)) (setq ins1 (cdr (assoc 10 (entget ssn)))) (command "zoom" "c" ins1 3000) (command "move" ssn "" ins1 pause) (setq key (+ 1 key)) ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.