View Full Version : Create Mtext with entmake
TobyKanoby
2007-06-06, 09:43 PM
I'm trying to get familiar with the entmake function and create mtext via the entmake function. I searched the forum and found a few topics on this, but none seemed to work out. Can someone help me figure out why the following isn't working?
(defun c:MakeMtext ()
(entmake
(list
'(0 . "MTEXT")
'(100 . "AcDbEntity")
'(67 . 1)
'(410 . "Layout1");Layout name
'(8 . "Notes");Layer name
'(100 . "AcDbMText")
'(10 3.0 5.0 0.0);Insertion point
'(40 . 0.0625);Text size
'(41 . 0.0)
'(71 . 1)
'(72 . 1)
'(1 . "TESTING");Text value
'(7 . "ROMANS");Font style
'(210 0.0 0.0 1.0)
'(11 1.0 0.0 0.0)
'(42 . 0.140476)
'(43 . 0.0625)
'(50 . 0.0)
'(73 . 1)
'(44 . 1.0)
)
)
(princ)
)
aaronic_abacus
2007-06-06, 09:48 PM
You forgot the dot(.) in some of your dxf codes.
TobyKanoby
2007-06-06, 10:10 PM
Here is the association list of what I am testing. The dxf lines for 10, 210, and 11 don't have a dot after the first dxf number. Is this what you mean?
(-1 . <Entity name: 7ef69620>)
(0 . MTEXT)
(330 . <Entity name: 7ef69528>)
(5 . 4F7C)
(100 . AcDbEntity)
(67 . 1)
(410 . Layout1)
(8 . Notes)
(100 . AcDbMText)
(10 3.0 5.0 0.0)
(40 . 0.0625)
(41 . 0.0)
(71 . 1)
(72 . 1)
(1 . TESTING)
(7 . ROMANS)
(210 0.0 0.0 1.0)
(11 1.0 0.0 0.0)
(42 . 0.140476)
(43 . 0.0625)
(50 . 0.0)
(73 . 1)
(44 . 1.0)
aaronic_abacus
2007-06-06, 10:12 PM
Oops, I just looked at the codes involving mtext and I think you got it right.
Disregard the previous post.
Adesu
2007-06-07, 01:18 AM
Hi Toby,
test this code
(entmake (list
'(0 . "MTEXT")
'(100 . "AcDbEntity")
'(67 . 0)
'(410 . "Model")
'(8 . "0")
'(100 . "AcDbMText")
'(10 10.7028 19.3082 0.0)
'(40 . 0.5)
'(41 . 5.03584)
'(71 . 1)
'(72 . 5)
'(1 . "AB\\PCD\\PEF\\PGH\\PIJ\\PKL")
'(7 . "Standard")
'(210 0.0 0.0 1.0)
'(11 1.0 0.0 0.0)
'(42 . 0.833333)
'(43 . 4.66667)
'(50 . 0.0)
'(73 . 1)
'(44 . 1.0)))
TobyKanoby
2007-06-07, 01:35 AM
Yes, that's it!
That will get me on the right track.
Thank you.
Adesu
2007-06-07, 01:43 AM
You are welcome.
Yes, that's it!
That will get me on the right track.
Thank you.
kennet.sjoberg
2007-06-07, 09:19 AM
Do not forget that text "strlen > 132" is stored in multiple assoc (3 . blablabla..
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.