- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a lisp routine that will insert a plain text string. I like the ENTMAKE with DXF values solution. The goal is to pick a point and a text string is inserted at the pick point.
Test1 command is what I have so far. I am missing something on the insertion point. The text comes in at 0.0.0
(defun c:test1 (/ pt-xy)
(setq pt-xy (getpoint " Text Insertion Point"))
(if pt-xy
(progn
(ENTMAKE
(LIST
(CONS 0 "TEXT")
(CONS 100 "AcDbEntity")
(CONS 100 "AcDbMText")
(CONS 10 pt-xy)
(cons 40 0.100)
(CONS 41 1.0)
(CONS 72 0)
(CONS 1 "Text 1 Here")
(CONS 7 "TOM")
(CONS 8 "LAY02")
(CONS 73 3)
); close list
); close entmake
); close progn
); close if pt-zx
(princ)
); close defun
I understand (Cons 10 pt-xy) is wrong. As written, it places the text at insertion = 0,0,0. Everything else I have tried has produced worse results.
I have a compareable Mtext routine that works very well.
And yes, I have the 270 page .PDF AutoCAD DXF reference. I have been through it several times, to the best of my comprehension. Do not present this as a solution.
Solved! Go to Solution.