0 Members and 1 Guest are viewing this topic.
(defun MeChgBlkEntCol ( / AcaDoc BlkCol) (setq AcaDoc (vla-get-activedocument (vlax-get-acad-object)) BlkCol (vla-get-Blocks AcaDoc) ) (vla-StartUndoMark AcaDoc) (vlax-for Obj BlkCol (if (= (vla-get-IsLayout Obj) :vlax-false) (MeChgCol Obj BlkCol) ) ) (vla-Regen AcaDoc acAllViewports) (vla-EndUndoMark AcaDoc) (princ))(defun MeChgCol (Obj Bcl) (vlax-for Ent Obj (if (= (vla-get-ObjectName Ent) "AcDbBlockReference") (MeChgCol (vla-item Bcl (vla-get-Name Ent)) Bcl) (if (vlax-property-available-p Ent 'Color) (vla-put-Color Ent 8) ) ) ))