@Anonymous wrote:
....
Would you say using an expression like this would be the simplest way to do this?
....
Yes, something like it. You can't do it via something like the Properties box or Text Editor except individually, and for that you'd need to calculate your own override text for each one. You can't have the default text content changed accordingly except by actually stretching all of them out by that amount, although the argument can certainly be made that that's just what you should do -- show the sheet at its actual size with the overage -- then you wouldn't need something like this. Another advantage of that approach is that if you need to change the sizes of things [column spacings, etc.], and you do that by Stretching, the text content of these Dimensions will update accordingly, which it will not if overridden with something like the Plus50 routine.
I say "something like" it, because there is almost always more than one way to accomplish just about anything. In this case, it can be done with slightly less code using VLA methods:
(vl-load-com); if needed
(defun C:Plus50 (/ dimss n dimobj)
; = override linear Dimension content with measured length Plus 50 drawing units
(if (setq dimss (ssget ":L" '((0 . "DIMENSION"))))
(repeat (setq n (sslength dimss))
(setq dimobj (vlax-ename->vla-object (ssname dimss (setq n (1- n)))))
(if (wcmatch (substr (vla-get-ObjectName dimobj) 5 5) "Align,Rotat")
; linear types [not Angular, Ordinate, Radius, Diameter, etc.]<--- allow some of those?
(vla-put-TextOverride
dimobj
(rtos (+ (vla-get-Measurement dimobj) 50)); new text override
); vla-put-...
); if
); repeat
); if
); defun
Kent Cooper, AIA