Something like this? Quickly written and tested and no minimal error handling: EDIT: Added an option to enter the text height or default to 20.
(defun c:foo (/ at dc ht i n obj ss)
(vl-load-com)
(vla-startundomark (setq dc (vla-get-activedocument (vlax-get-acad-object))))
(if (and (setq ss (ssget '((0 . "INSERT"))))
(setq ht (getreal "\nEnter Height Value <20.0>: ")
ht (if ht ht 20.0)
)
)
(repeat (setq i (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq i (1- i))))
at (vla-getattributes obj)
at (if at (vlax-variant-value at))
n 0
)
(while (and at (>= (vlax-safearray-get-u-bound at 1) n))
(vla-put-height (vlax-safearray-get-element at n) ht)
(setq n (1+ n))
)
)
)
(vla-endundomark dc)
(princ)
)