My variant. It is indifferent to formatting MTEXT, to formatting %% u %% o, to a divider "." or ",". Processes MTEXT with several paragraphs.
;helper function. Unformat Mtext
(defun mip_MTEXT_Unformat ( Mtext / text Str )
(setq Text "")
(while (/= Mtext "")
(cond
((wcmatch (strcase (setq Str (substr Mtext 1 2))) "\\[\\{}]")
(setq Mtext (substr Mtext 3) Text (strcat Text Str)))
((wcmatch (substr Mtext 1 1) "[{}]")(setq Mtext (substr Mtext 2)))
((wcmatch (strcase (setq Str (substr Mtext 1 2))) "\\[LO`~]")
(setq Mtext (substr Mtext 3)))
((wcmatch (strcase (substr Mtext 1 2)) "\\[ACFHQTW]")
(setq Mtext (substr Mtext (+ 2 (vl-string-search ";" Mtext)))))
((wcmatch (strcase (substr Mtext 1 2)) "\\P")
(if (or(= " " (substr Text (strlen Text)))
(= " " (substr Mtext 3 1)))
(setq Mtext (substr Mtext 3))
(setq Mtext (substr Mtext 3) Text (strcat Text " "))))
((wcmatch (strcase (substr Mtext 1 2)) "\\S")
(setq Str (substr Mtext 3 (- (vl-string-search ";" Mtext) 2))
Text (strcat Text (vl-string-translate "#^\\" "/^\\" Str))
Mtext (substr Mtext (+ 4 (strlen Str)))))
(t (setq Text (strcat Text (substr Mtext 1 1)) Mtext (substr Mtext 2)))
))
Text
)
;helper function
(defun str-str-lst (str pat / i)
(cond ((= str "") nil)
((setq i (vl-string-search pat str))
(cons (substr str 1 i)
(str-str-lst (substr str (+ (strlen pat) 1 i)) pat)
) ;_ cons
)
(t (list str))
) ;_ cond
) ;_ defun
(defun C:TT ( / ent ss str res)
(vl-load-com)(princ "\nSelect text")
(if (setq ss (ssget "_+.:S:E:L" '((0 . "*TEXT"))))
(progn
(setq ent (ssname ss 0)
str (str-str-lst (vla-get-textstring (setq ent (vlax-ename->vla-object ent))) "\\P")
str (mapcar '(lambda(x)(mip_mtext_unformat x)) str)
str (mapcar '(lambda(x)(vl-string-translate "," "." (vl-string-trim "%UuoOcC \t" x))) str)
res (mapcar 'atof str)
res (mapcar '(lambda(nu)
(setq nu (/ nu 14.5)
nu (* nu 18)))
res)
res (apply 'strcat
(mapcar '(lambda(x)(strcat (rtos x 2 2) "\\P")) res))
res (vl-string-right-trim "\\P" res)
);_setq
(vla-put-textstring ent res)
(vla-put-color ent 1)
)
)
(princ)
)