Mtext- setting width

Discussion in 'AutoCAD' started by Jim Pehrsson, Aug 6, 2003.

  1. Jim Pehrsson

    Jim Pehrsson Guest

    When I am detailing I place a lot of leaders without much thought to the
    final cluttered look. I then need to set the width of these Mtexts from
    zero to just about always 1500 (mm). While I know I can globally or
    individually edit these, it would be nice to have a tool that just reset
    the width of a selected text to 1500 (or whatever). I could then drag the
    grips to finely adjust the text/detail for the particular note/text.

    Any thoughts out there?

    TIA

    Jim
     
    Jim Pehrsson, Aug 6, 2003
    #1
  2. Somethin' like either one of these....

    ; prompt user for width
    (defun c:mtextWidth (/ ss width i data)
    (if
    (and
    (setq ss (ssget '((0 . "MTEXT"))))
    (progn
    (initget 5)
    (setq width (getreal "\nspecify new width: "))
    )
    )
    (progn
    (setq i -1)
    (repeat (sslength ss)
    (setq data (entget (ssname ss (setq i (1+ i)))))
    (entmod (subst (cons 41 width) (assoc 41 data) data))
    )
    )
    )
    (princ)
    )

    ; preset width
    (defun c:mtext1500 (/ ss i data)
    (if
    (setq ss (ssget '((0 . "MTEXT"))))
    (progn
    (setq i -1)
    (repeat (sslength ss)
    (setq data (entget (ssname ss (setq i (1+ i)))))
    (entmod (subst '(41 . 1500) (assoc 41 data) data))
    )
    )
    )
    (princ)
    )
     
    Jason Piercey, Aug 6, 2003
    #2
  3. Jim Pehrsson

    Dan Allen Guest

    the matchprops paint brush applies the mtext width
     
    Dan Allen, Aug 7, 2003
    #3
  4. Jim Pehrsson

    Jim Pehrsson Guest

    Thanks Dan. I use the match properties but it remembers a left or right
    aligned leader so it is a further complication.

    Tried Jason's solution - Worked a treat THANKS Jason

    Jim
     
    Jim Pehrsson, Aug 7, 2003
    #4
  5. If the text you are talking about is the only text style in the drawing, you
    can change the width in the style dialog box.
    Just a thought,
    Matt V
     
    Matt Vozzella, Aug 8, 2003
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.