dbroada Posted March 30, 2010 Share Posted March 30, 2010 I see that Lee has written something similar recently and that he is on the forum right now. I wonder if I will be lucky.... I have a drawing in which somebody has used "FIT" justification on all his text. It looks rubbish. I have changed all the text into MTEXT but would like to reduce the width of the text string - NOT THE BOX - to 80%. I can easily edit to do this but a simple click would be preferable. Any routines available? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 Give this a shot Dave, (defun c:mtw (/ i ss e s el) (if (and (setq i -1 ss (ssget "_:L" '((0 . "MTEXT")))) (not (initget 6)) (setq w (cond ((getreal "\nSpecify Width Factor <0.8> : ")) (0.))) (while (setq e (ssname ss (setq i (1+ i)))) (setq s (cdr (assoc 1 (setq el (entget e))))) (entmod (subst (cons 1 (strcat "{\\W" (rtos w) ";" s "}")) (assoc 1 el) el)))) (princ)) Be careful with pre-formatted MText though, as it messes with MText formatting strings. Lee Quote Link to comment Share on other sites More sharing options...
dbroada Posted March 30, 2010 Author Share Posted March 30, 2010 First look - seems to do excactly what I want. I don't have a problem with pre formating as a little while ago it was a text object rather than an MTEXT object. Yet again, many thanks. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 Not a problem Dave, happy to help Quote Link to comment Share on other sites More sharing options...
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.