KRBeckman Posted February 3, 2010 Posted February 3, 2010 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!! Quote
Lee Mac Posted February 3, 2010 Posted February 3, 2010 (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)) Quote
lpseifert Posted February 3, 2010 Posted February 3, 2010 and to be sure it's all caps (setq str (strcase(getstring t "\nMText String: "))) Quote
KRBeckman Posted February 3, 2010 Author Posted February 3, 2010 Yeah, that was going to be my next question... Thanks to both of you! Quote
KRBeckman Posted February 3, 2010 Author Posted February 3, 2010 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. Quote
KRBeckman Posted February 3, 2010 Author Posted February 3, 2010 Nevermind, found it in the Visual Lisp Editor Help. I swear I looked before I posted the question Quote
Lee Mac Posted February 3, 2010 Posted February 3, 2010 This may help you: http://autodesk.com/techpubs/autocad/acad2000/dxf/ Quote
KRBeckman Posted February 3, 2010 Author Posted February 3, 2010 Yes that will, its now in my favorites. Thanks a ton for all your help. Quote
Recommended Posts
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.