Mtext- setting width

Jim Pehrsson

Usenet Archive
Joined
Aug 6, 2003
Messages
3
Reaction score
0
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
 
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)
)
 
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
 
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
 

Member Recommended

Back
Top