TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: FELIX on April 13, 2014, 08:11:42 PM
-
How modifying the color of a lwpoyline?
assoc 62 does not work.
-
This works for me:
(setq ent (entget (car (entsel))))
(if (assoc 62 ent)
(entmod (subst '(62 . 256) (assoc 62 ent) ent));;change to bylayer
(entmod (reverse (cons '(62 . 2) (reverse ent))));;change to yellow
)
-
OK.
-
Dear Jeff
Why third line (1st entmod) is required ?
Why can't only 2nd entmod be applied directly ?
-
Why can't only 2nd entmod be applied directly ?
Exactly.
Regardless wether DXF 62 exist or not you can just go ahead and use append function
(if (and (setq e (car (entsel)))
(setq ent (entget e))
)
(entmod (append ent '((62 . 52)));<<- whatever color
)