[Before Message 7 arrived]
I find that (append)ing a text-content entry on the end of the entity data list doesn't replace the earlier one, but appends content to it, resulting in a doubling of the content, the first being the original in whatever Style/font that is, and the second having the Arial font override. So it's necessary to replace the entry wholesale [which could be done with a little less code using (setpropertyvalue) instead of what's below, but since we're into entity data for the other reason...].
And I find the code-79 entry for Column Autoheight rejected, probably because by default my Mtext has no columns, reinforcing the need to specify other Column-related settings if they're really needed [see my previous Reply].
Ignoring that, this seems to work in minimal testing:
(defun C:WHATEVER (/ edata)
(command-s "_.pasteclip")
(setq edata (entget (entlast)))
(if (member '(0 . "MTEXT") edata); it's the right kind of thing
(progn ; then
(setq edata
(subst ; replace:
(cons 1 ; text content
(strcat
"{\\fArial|b0|i0|c0|p34;"
(cdr (assoc 1 edata))
"}"
); strcat
); cons
(assoc 1 edata); original without font override
edata
); subst
); setq
(entmod
(append
edata
'(
(40 . 2.2171); height
(44 . 0.8727); line space factor
(73 . 2); line space style=exactly
(71 . 1); justify=top left
(41 . 95.0); defined width
); list
); append
); entmod
); progn
); if
(prin1)
)
Your last Copy-stuff-to-the-clipboard needs to have been text content from inside a cell in Excel, or pulled from some Text/Mtext object in AutoCAD, or probably some other possible text sources, but not just anything. For example, it doesn't work pulling content from MS Word, which Pastes in as an OLE object.
Kent Cooper, AIA