Matt, if you just wanted to create the MTEXT, this would suffice:
(defun c:test (/ str p1 p2)
(setq str "Matt W")
(and (setq p1 (getpoint "\nSpecify First Corner: "))
(setq p2 (getcorner p1 "\nSpecify Second Corner: "))
(entmake
(list
(cons 0 "MTEXT")
(cons 100 "AcDbEntity")
(cons 100 "AcDbMText")
(cons 10 p1)
(cons 40 (getvar "TEXTSIZE"))
(cons 41 (abs (- (car p2) (car p1))))
(cons 7 (getvar "TEXTSTYLE"))
(cons 1 str))))
(princ))
But everytime I try to get the Text Editor up, using either ddedit, or mtedit, I get this error:
Specify First Corner:
Specify Second Corner: _.ddedit
Select an annotation object or [Undo]: Application ERROR: irfcld
Select an annotation object or [Undo]:
Command: ; error: invalid AutoCAD command: <Entity name: 7ec1f6d8>
Can't for the life of me work out why :ugly: