Hey guys, need alittle help with this lisp. It's not working and I can't figure out why...
For the new conduit that we are routing on our drawings, my boss wanted me to put it on the same layer as the old conduit but change the color from ByLayer that is set to blue, to 160, so that we could print it out alittle bolder to stand out. Now I'm trying to write a lisp to change everything that is set to 160 back to ByLayer. This is what I've come up with so far and it only deals with lines but it still doesn't work. Any help is appreciated. Also, is there any way to select everything on that color, rather then selecting all lines, then all p-lines then all splines on that color? I couldn't figure that out.
Thanks in advance guys!
(defun c:conduitbylayer ()
(setq ss1 (ssget "_X" '((0 . "LINE") (62 . 160)))) ;CREATE SELECTION SET
(if (/= ss1 nil) ;IF
(setq numsel (sslength ss1)) ;THEN
(setq numsel 0) ;ELSE
)
(setq numsel (1- numsel))
(while (/= numsel -1)
(setq ent1 (ssname ss1 numsel))
(setq entdata1 (entget ent1))
(setq entdata1 (subst (cons 62 -1) (assoc 62 entdata1) entdata1 ))
(entmod entdata1)
)
) ;END OF ROUTINE