It's not quite clear to me whether the OP is looking for an under-the-line *replacement* for existing dimension text content [which your routine seems to do if they don't choose to clear the override, though I didn't study it very deeply], or perhaps an *added* piece of text below, with existing dimension text to remain. If the latter, there are different possibilities.
If the existing text is the actual measurement, there could be an option built into a routine like this that would use:
(strcat "<>\\X" text)
as the text override.
And assuming the problem with angle brackets on the website interface hasn't changed, that code line should be:
(strcat "less-than-symbol greater-than-symbol \\X" text)
The less-than and greater-than symbols [angle brackets] stand for the actual measurement [in current units], when you want to add a prefix and/or suffix with a text override.
Or if there might already be an override, and they want to leave that and add something below, there could be an option that saves the current text and then imposes something like:
(strcat currenttext "\\X" text)
If they want to keep *whatever* is there, regardless of whether it's default or overridden, and add something below, it could do something like:
{code}
....
(setq currenttext (vla-get-textoverride vla_dim))
(if (= currenttext ""); for default measurement
(setq currenttext "less-than-symbol greater-than-symbol")
;;...[but actually use angle brackets]...
); end if
(vla-put-textoverride vla_dim (strcat currenttext "\\X" text))
....
{code}
--
Kent Cooper
Kent Cooper, AIA