Kent Cooper's lisp modified to only change color
Code:
;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-color-of-dimensions-with-text-override/m-p/5107144#M323608
(vl-load-com); [if not already done]
(if (setq ss (ssget "_X" '((0 . "DIMENSION") (1 . "~")))); ignores no-override ones; returns nil if it finds none
(progn ; "wrapper" to make all operations into one 'then' argument
(command "_.layer" "_thaw" "Dimensions_Overridden Text" ""); just in case -- won't care if it doesn't exist
(repeat (sslength ss)
(setq en (ssname ss 0))
(if (not (wcmatch (cdr (assoc 1 (entget en))) "*<>*")); override doesn't contain actual measurement
(progn ; 'then'
(if (not (tblsearch "layer" "Dimensions_Overridden Text"))
; doesn't already exist -- create only if not and if appropriate object(s) found
(command "_.layer" "_new" "Dimensions_Overridden Text" "c" "6" "Dimensions_Overridden Text" "")
; [no need to Thaw if new]
); if
(vlax-put (setq obj (vlax-ename->vla-object en)) 'Color 256); = Bylayer
); progn
); if
(ssdel en ss)
); repeat
); progn ['then' -- no 'else' -- do nothing if none found]
); if [found some potentially appropriate object(s)]
(princ)
Change Color from 256 (ByLayer) to the color you want like 6
His original code makes it stand out better and allows you to modify properties like the color easily by modifying the "Layer "Dimensions_Overridden Text".