I am a bit out of practice when it comes to writing AutoLisp code (but i didnt know it was this bad). I needed to create a small helper app that forces the color and linetype of some line-work (line, circle, polyline, arc) to a hidden ltype and a screened color.
I found myself writing this; is that right or am I just that out of practice?
-that is to say:
1. If the color and linetype is BYLAYER then they dont show up in the entlist?
2. I remember the VL prop list being longer (color isnt in there).
I'm not going to include the rest of the code (where I check for loaded line types, and the other stuff I did because so-far its just flat out embarrassing; it looks like C *lol*).
(setq elist (entget (ssname ss cntr)))
(if (assoc 62 elist)
(setq elist (subst '(62 . 169) (assoc 62 elist) elist))
(setq elist (append elist '((62 . 169))))
)
;; set the color
(if (assoc 6 elist)
(setq elist (subst '(6 . "HIDDEN2") (assoc 6 elist) elist))
(setq elist (append elist '((6 . "HIDDEN2"))))
)
;; set the ltype
(entmod elist)
;; modify it