I am looking to find a Lisp routine that will allow me to change the color of a selected object, the layer color not just the object.
I want to just do the command and select the color I want and then select all the objects and have those layers change to the color I input.
I found the code below but it changes only the object, anyone know how to fix this code to make it do layers? or does anyone have a similar routine?
(defun c:chc (/ s i e)
(if (not c)
(setq c 1)
)
(while
(not (< 0
(setq
c
(cond
((getint (strcat "\n Specify color between [1-255] ( "
(itoa c)
" ) : "
)
)
)
(t c)
)
)
255
)
)
(princ "\n Number of color must be between [1-255] ")
)
(if
(and
c
(progn (princ "\n Select object to change their Layer colors ")
(setq s (ssget "_:L"))
)
)
(repeat (setq i (sslength s))
(setq e (entget (ssname s (setq i (1- i)))))
(entmod (append e (list (cons 62 c))))
)
)
(princ)
)
Thanks!