EmilyB Posted January 5, 2011 Posted January 5, 2011 Hello, Is there any way to automatically re-size text boxes to fit text? The reason I ask is that I've got background mask on all my text and have just reduced the text size by half - I'm not looking forward to resizing each box..... Thanks for your time, Emily Quote
CyberAngel Posted January 5, 2011 Posted January 5, 2011 Welcome to the forum! There is no way to do that, as far as I know. It would be nice if AutoCAD resized mtext width automatically when you changed the height. Something for the Wish List, I guess.... 1 Quote
EmilyB Posted January 5, 2011 Author Posted January 5, 2011 Thanks for your help! Sounds like its time to get the ipod out while I start resizing!! Cheers, Emily Quote
ccowgill Posted January 6, 2011 Posted January 6, 2011 are you referring to the box that is created when using the express tool textmask? if so, it may be quicker to TEXTUNMASK then TEXTMASK each text entity. Quote
designerstuart Posted January 6, 2011 Posted January 6, 2011 if a load of the mtexts are the same size, you can at least do one the right size, then match properties for the rest. partial answer at best i'm afraid! Quote
EmilyB Posted January 6, 2011 Author Posted January 6, 2011 Thanks for all your advice. Unfortunately I can't match properties as my text is all at different angles. I'll look into the textmask tool as that sounds it'd be helpful to use for new text - just in case I have to resize again. Cheers, Emily Quote
ccowgill Posted January 7, 2011 Posted January 7, 2011 if you use the background mask that is a mtext property, it should automatically resize. and if TextUnmask doesnt get rid of the mask, it sounds like someone created a wipeout manually and put it behind the text. Quote
Lee Mac Posted January 9, 2011 Posted January 9, 2011 Would something like this work? (defun c:UpdateMTextWidth ( / ss i e ) (vl-load-com) ;; © Lee Mac 2011 (if (setq ss (ssget "_:L" '((0 . "MTEXT")))) (repeat (setq i (sslength ss)) (vla-put-width (vlax-ename->vla-object (setq e (ssname ss (setq i (1- i))))) (* 1.05 (cdr (assoc 42 (entget e)))) ) ) ) (princ) ) Quote
ccowgill Posted January 10, 2011 Posted January 10, 2011 I stand corrected, if the mtext has a predefined width, the background mask will not automatically resize. I completely forgot about predefined width, as most of our notes do not have widths. Quote
IndianaJackson Posted October 18, 2019 Posted October 18, 2019 Lee Mac- I copied the following exactly as shown below and pasted it into a notepad and saved it as an .lsp file. Then I went to my UI and loaded the lisp. Then I typed UpdateTextWidth and the command line says Select Objects, but when I select my mtext and press enter, nothing happens. It deselects and ends the command with no comment. Did I do something incorrectly? Thank you, Heidi (defun c:UpdateMTextWidth ( / ss i e ) (vl-load-com) ;; © Lee Mac 2011 (if (setq ss (ssget "_:L" '((0 . "MTEXT")))) (repeat (setq i (sslength ss)) (vla-put-width (vlax-ename->vla-object (setq e (ssname ss (setq i (1- i))))) (* 1.05 (cdr (assoc 42 (entget e)))) ) ) ) (princ) ) 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.