To avoid overrides being permanent I've chosen this path to create a DIMEN layer and start the linear dimension command with 3 overrides for color. Then I want to return the color back to it's original state while eliminating the override.
I started with a snippet from Balaji Ramamoorthy's post on AutoCAD DevBlog -
https://adndevblog.typepad.com/autocad/2012/06/overcoming-dimstyle-overrides.html,
and a post from Lee Mac on changing Dimscale using the same method -
https://www.theswamp.org/index.php?topic=41211.msg463704#msg463704All seems to work. I just I want to make sure I haven't missed something or am misunderstanding something. Any critique would be great.
(defun c:LimDim
( / curdimstyle curdoc
)
;; Get the current dimstyle
) ;setq
;; Modify the current dimstyle.
;; This is done by changing the current dimvars
;; and by saving the dimvars in the dimstyle.
;; Change a dimvar.
;; Save the current dim vars in the current dim style.
(command "layer" "make" "DIMEN" "COLOR" "GREEN" "DIMEN" "") (command-S "dimlinear" pause pause pause)
;; Save the current dim vars in the current dim style.
)