Results 1 to 8 of 8

Thread: Create Mtext with entmake

  1. #1
    Member TobyKanoby's Avatar
    Join Date
    2006-06
    Posts
    25
    Login to Give a bone
    0

    Default Create Mtext with entmake

    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?
    Code:
    (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)
    )

  2. #2
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    You forgot the dot(.) in some of your dxf codes.

  3. #3
    Member TobyKanoby's Avatar
    Join Date
    2006-06
    Posts
    25
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    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)

  4. #4
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    Oops, I just looked at the codes involving mtext and I think you got it right.
    Disregard the previous post.
    Last edited by aaronic_abacus; 2007-06-06 at 09:56 PM.

  5. #5
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    Hi Toby,
    test this code
    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)))

  6. #6
    Member TobyKanoby's Avatar
    Join Date
    2006-06
    Posts
    25
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    Yes, that's it!
    That will get me on the right track.
    Thank you.

  7. #7
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    You are welcome.

    Quote Originally Posted by TobyKanoby
    Yes, that's it!
    That will get me on the right track.
    Thank you.

  8. #8
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Create Mtext with entmake

    Do not forget that text "strlen > 132" is stored in multiple assoc (3 . blablabla..

    : ) Happy Computing !

    kennet

Similar Threads

  1. ENTMAKE MTEXT WITH NUMBERED LIST
    By Lansteys in forum AutoLISP
    Replies: 5
    Last Post: 2014-10-10, 10:54 AM
  2. Replies: 19
    Last Post: 2010-09-14, 04:00 PM
  3. trying to use entmake to create a mlinestyle
    By d_m_hopper in forum AutoLISP
    Replies: 3
    Last Post: 2009-01-19, 02:29 PM
  4. Using entmake to create a block
    By t-bone67 in forum AutoLISP
    Replies: 1
    Last Post: 2005-06-06, 06:08 PM
  5. Using entmake to create (redefine) Blocks
    By melkor in forum AutoLISP
    Replies: 2
    Last Post: 2005-01-26, 11:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •