Jump to content

DXF Reference for Setting TextStyle with MTEXT


Recommended Posts

Posted (edited)

I'm using the following code to insert some text in a drawing. Many thanks to Lee Mac for sharing this snippet with us:

 

(defun M-Text (pt str txtcolor)
 (entmakex (list (cons 0 "MTEXT")         
                 (cons 100 "AcDbEntity")
                 (cons 100 "AcDbMText")
   (cons 10 pt)
   (cons 71 5)
   (cons 62 txtcolor)
                 (cons 1 str))))

 

I'd like to add an additional (cons) statement to this to be able to set the textstyle for the text. I've looked through the DXF Reference guide but don't seem to find the right switch. I'm thinking about some other options but was hoping to stick with this handy utility first.

 

(RESOLVED) Found it.....#7. Just had to keep searching through all the "Create TextStyle" posts.

Edited by Bill Tillman

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...