Jump to content

MTEXT AutoLisp Problem


KRBeckman

Recommended Posts

I'm kinda embarassed to post this one, but I'm having a heck of a time creating a lisp that will create a MText entity the way I want it, where I want it... The location it puts it is never consistant.

 

Here's what I've got:

 

(defun C:dt()
 (setq caps_on   (getstring "\nPlease varify that the Caps Lock is on<Y>"))
 (setq note_text (getstring T "\nPlease input what you would like the note to say:"))
 (setq note      (strcat "NOTE: " note_text))
 (command "-mtext" '(0.05 1.117 0.0) "j" "BL" "s" "romans" "W" "3" note "")
 (command "chprop" "l" "" "la" "A-Anno-Dims" "C" "GREEN" "")
)

 

 

Help Please!!

Link to comment
Share on other sites

(defun c:mtxt  (/ str)
 
 (setq str (getstring t "\nMText String: "))

 (entmakex (list (cons 0 "MTEXT")
                 (cons 100 "AcDbEntity")
                 (cons 100 "AcDbMText")
                 (cons 8 "A-Anno-Dims")
                 (cons 62 3)
                 (cons 10 '(0.05 1.117 0.0))                 
                 (cons 7 "romans")
                 (cons 1 (strcat "NOTE: " str))
                 (cons 41 3)
                 (cons 71 7)))

 (princ))

Link to comment
Share on other sites

One more thing and I think I'm good with this one... What # would I put after cons to change the text height of this mtext entity? Better yet... where would I got to find that number?

 

Thanks again.

Link to comment
Share on other sites

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...