Originally Posted by
rhodinj1427782
Hy,
is there lips that change all YELLOW color into Color 8?
The most obvious response would be QSELECT + Properties Dialog
Originally Posted by
rhodinj1427782
First = it will be good to change all drawings colored yellow to be changed BY LAYER (all line, polyline, object colored yellow to change color by layer)
command: Setbylayer
Originally Posted by
rhodinj1427782
second = then all layers colored yellow change to Color 8
Layer dialog.
Do you really really need a lisp code for this rhodinj?
Code:
(defun c:ctg ( / color ss i e l a cur data) ;<-- Color To Gray
(while
(progn
(initget 7)
(setq color (getint "\nEnter Color to process [2/50/51]: "))
(if (not (member color '(2 50 51)))
(princ "\nInvalid Value")
)
)
)
(if (setq ss (ssget "_X" (list (cons 62 color))))
(repeat (setq i (sslength ss))
(setq e (entget (ssname ss (setq i (1- i))))
l (assoc -1 e))
(entmod (list'(62 . 256) l))
)
)
(while (setq a (tblnext "LAYER" (null a)))
(if
(= color
(abs (cdr (setq cur
(assoc 62
(setq data
(entget
(tblobjname "LAYER" (cdr (assoc 2 a)))
)
)
)
)
)
)
)
(entmod (subst (cons 62
(if (minusp (cdr cur)) (- 8) 8))
cur data))
)
)
(princ)
)
HTH