TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TJAM51 on March 16, 2005, 03:16:43 PM
-
The routine below only allows a single pick of lines.....I need some assistance in where it will do a crossing as well as a single pick....
Thanks
(defun c:h (/ sSet *error*)
(defun *error* (msg)
(setvar "cmdecho" 1)
); end *error*
(setvar "cmdecho" 0)
(princ "*** Select objects for Hatch & press [Enter] ")
(terpri)
(command "hatch" "" "" "")
(while (= 1 (getvar "cmdactive"))
(command pause)
); end while
(command "")
(princ)
)
-
I could use some help on this....
thanks
-
This will get you started.
(defun c:h (/ ss)
(setvar "cmdecho" 0)
(prompt "\n*** Select objects for Hatch & press [Enter] ")
(if (and (setq ss (ssget))
(> (sslength ss) 0))
(command "hatch" "" "" "" ss "")
)
(princ)
)
-
When I load the routine I receive the following error message.....
error: malformed list on input
-
Just missing a closing parenthesis after the local declarations, try this --
(defun c:h (/ ss)
(setvar "cmdecho" 0)
(prompt "\n*** Select objects for Hatch & press [Enter] ")
(if (and
(setq ss (ssget))
(> (sslength ss) 0)
)
(command "hatch" "" "" "" ss "")
)
(princ)
)
-
Thanks MP, I added it to my post too. :)
-
My pleasure. :)