(vl-catch-all-apply
(function (lambda ()
(vla-put-color M COL)
(vla-put-dimensionlinecolor M COL)
(vla-put-textcolor M COL)
(vla-put-extensionlinecolor M COL)
)
)
)
(if (and (= (vla-get-objectname M) "AcDbBlockReference")
(= (vla-get-hasattributes M) :vlax-true)
)
(mapcar
'(lambda (NN)
(vla-put-color NN COL)
)
(vlax-safearray->list
(vlax-variant-value
(vla-getattributes
M
)
)
)
)
)