+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jan 2011
    Posts
    3

    Default Text box auto resize

    Registered forum members do not see this ad.

    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

  2. #2
    Super Member CyberAngel's Avatar
    Computer Details
    CyberAngel's Computer Details
    Operating System:
    Windows 10
    Discipline
    Architectural
    CyberAngel's Discipline Details
    Occupation
    Civil Drafter
    Discipline
    Architectural
    Details
    Roofing and Waterproofing
    Using
    AutoCAD 2014
    Join Date
    Jul 2006
    Location
    Anywhere Else
    Posts
    1,138

    Default

    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....
    breaking AutoCAD on a regular basis since 1991

  3. #3
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jan 2011
    Posts
    3

    Default

    Thanks for your help!

    Sounds like its time to get the ipod out while I start resizing!!

    Cheers,
    Emily

  4. #4
    Senior Member ccowgill's Avatar
    Computer Details
    ccowgill's Computer Details
    Operating System:
    Windows 10
    Motherboard:
    Sabretooth
    CPU:
    AMD
    RAM:
    32GB
    Graphics:
    AMD R9 390
    Primary Storage:
    SSD
    Monitor:
    Triple Monitor system
    Discipline
    Civil
    ccowgill's Discipline Details
    Occupation
    Civil Engineer
    Discipline
    Civil
    Details
    Licensed Civil Engineer in Michigan, Indiana, and Ohio
    Using
    Civil 3D 2017
    Join Date
    Dec 2010
    Location
    Hartford, Michigan
    Posts
    205

    Default

    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.
    Christopher T. Cowgill, P.E.
    Wightman & Associates, Inc.
    Engineering * Surveying * Architecture
    IDSP 2017 on Windows 10


  5. #5
    Super Member
    Computer Details
    designerstuart's Computer Details
    Operating System:
    xp
    Computer:
    various
    Discipline
    Architectural
    designerstuart's Discipline Details
    Occupation
    architect
    Discipline
    Architectural
    Using
    ADT 2009
    Join Date
    Jun 2010
    Location
    near london, near europe
    Posts
    867

    Default

    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!

  6. #6
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jan 2011
    Posts
    3

    Default

    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

  7. #7
    Senior Member ccowgill's Avatar
    Computer Details
    ccowgill's Computer Details
    Operating System:
    Windows 10
    Motherboard:
    Sabretooth
    CPU:
    AMD
    RAM:
    32GB
    Graphics:
    AMD R9 390
    Primary Storage:
    SSD
    Monitor:
    Triple Monitor system
    Discipline
    Civil
    ccowgill's Discipline Details
    Occupation
    Civil Engineer
    Discipline
    Civil
    Details
    Licensed Civil Engineer in Michigan, Indiana, and Ohio
    Using
    Civil 3D 2017
    Join Date
    Dec 2010
    Location
    Hartford, Michigan
    Posts
    205

    Default

    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.
    Christopher T. Cowgill, P.E.
    Wightman & Associates, Inc.
    Engineering * Surveying * Architecture
    IDSP 2017 on Windows 10


  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,364

    Default

    Would something like this work?

    Code:
    (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)
    )
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  9. #9
    Senior Member ccowgill's Avatar
    Computer Details
    ccowgill's Computer Details
    Operating System:
    Windows 10
    Motherboard:
    Sabretooth
    CPU:
    AMD
    RAM:
    32GB
    Graphics:
    AMD R9 390
    Primary Storage:
    SSD
    Monitor:
    Triple Monitor system
    Discipline
    Civil
    ccowgill's Discipline Details
    Occupation
    Civil Engineer
    Discipline
    Civil
    Details
    Licensed Civil Engineer in Michigan, Indiana, and Ohio
    Using
    Civil 3D 2017
    Join Date
    Dec 2010
    Location
    Hartford, Michigan
    Posts
    205

    Default

    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.
    Christopher T. Cowgill, P.E.
    Wightman & Associates, Inc.
    Engineering * Surveying * Architecture
    IDSP 2017 on Windows 10


  10. #10
    Junior Member
    Using
    AutoCAD 2015
    Join Date
    Jan 2015
    Posts
    14

    Default nice

    Registered forum members do not see this ad.

    Lee Mac is Amazing

Similar Threads

  1. Auto Selecting Text
    By caltes75 in forum AutoLISP, Visual LISP & DCL
    Replies: 16
    Last Post: 1st Sep 2010, 08:20 pm
  2. Replies: 20
    Last Post: 23rd Jun 2010, 07:48 pm
  3. Auto Text
    By arnoldwanya in forum AutoCAD General
    Replies: 4
    Last Post: 29th Jul 2009, 01:21 pm
  4. Text box border auto-resize?
    By ivanyhtang in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 3
    Last Post: 30th Jun 2009, 11:22 am
  5. Text Auto Line Up??
    By AQucsaiJr in forum AutoCAD General
    Replies: 15
    Last Post: 20th May 2009, 09:15 pm

Bookmarks

Posting Permissions

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