This is one for changing attributes to color bylayer. I got it ether here or on Autodesk forums.
1.
Code:
(if (ssget "x" '((0 . "INSERT")(66 . 1)))
(progn
(setq ss (vla-get-activeselectionset
(vla-get-activedocument
(vlax-get-acad-object))))
(vlax-for blk ss
(setq atts (vlax-invoke blk 'getattributes))
(foreach att atts
(vla-put-color att 256)
)
)
)
)
2nd
Code:
(setq doc (vla-get-activeDocument (vlax-get-acad-object))
layouts (vla-get-layouts doc)
)
(vlax-for layout layouts
(vla-put-showPlotStyles layout (if state :vlax-true :vlax-false))
)
;(vla-regen doc acAllViewports)
Any help to make it work again would be greatly appreciated.
Chris