My take :
(defun c:Test (/ *error* sel m dz)
(vl-load-com)
;; Tharwat 21.12.2014 ;;
(defun *error* (msg)
(if dz
(setvar 'DIMZIN dz)
)
(if (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")
(princ (strcat "\n** Error: " msg " **"))
)
(princ)
)
(setq dz (getvar 'DIMZIN))
(setvar 'DIMZIN 0)
(princ "\n Select Dimensions to divide on 100. units ")
(if (ssget "_:L" '((0 . "*DIMENSION")))
(vlax-for dim (setq sel (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object))))
(if (> (setq m (vla-get-measurement dim)) 100.)
(progn (vla-put-LinearScaleFactor dim 0.001)
;; Above command scales the dimension by 1/1000
(vla-put-TextSuffix dim "m")
;; Above command adds Suffix "m" to text
(vla-put-PrimaryUnitsPrecision dim 0.00)
;; Above command sets the precision to 2 digits. You can change the precision according to following options :-
;; Options : 0. ; 0.0 ; 0.00 ; 0.000 ; 0.0000 ; 0.00000 ; 0.000000 ; 0.0000000 and 0.00000000
(vla-Update dim)
;; Above command updates the dimension according to above changes
)
)
)
)
(if sel
(vla-delete sel)
)
(*error* nil)
(princ)
)
The above routine is better because it does not override the text. It just adds changes scale, adds suffix and sets precision.