Jump to content

Whats the matter with my multiline text?


Recommended Posts

Hi guys, I'm having minor albeit annoying problems with multiline. When I want to insert a multiline text, the width seems to stretch all the way off to the right to infinity despite me dragging my mouse to make it the width intended. :D Does anybody know a way I can resize it to the width I want?

 

This is how it looks:

28h3p1e.png

 

I've tried zooming out to re-size it but to no avail

 

thanks

Link to comment
Share on other sites

After starting the MTEXT command, select the Columns option, then choose DYNAMIC, and specify a positive value for the column width, and that will become default width displayed by the text formatting editor for the MTEXT command for a new entity.

Or you can make such changes in the PROPERTIES directly.

 

Or you can just specify a WIDTH using that commandline option after you have defined the first corner of you new MTEXT, which will then become the default, until you change it again.

If you set the WIDTH to 0, then the mtext window will start fully collapsed, if empty, and expand to exactly accommodate the length of the new mtext. :wink:

Edited by Dadgad
Link to comment
Share on other sites

Thank you for the response Dadgad, this is however not exactly what I'm after. I would rather that the text box width and height was defined by the way I drag my mouse as opposed to entering width and stuff as it used to do in older CAD versions I've used.

Link to comment
Share on other sites

img01.jpg

 

On a similar note, what option would I need to enable/change to make the defined column width (which I manually done by double clicking the ruler in the mtext editor to expand the column size to fit the text) default dynamically like that shown in TEST01. TEST02 is what it looks like for me before doing that (and obviously the length of characters inside is variable and will change).

Link to comment
Share on other sites

I think you want MTEXTCOLUMN set to 2, so you can still adjust the height manually if you wish,

as I see you have stretch grips for height showing.

 

In the image I have done the MTEXT style 3 different ways, they all have had the default WIDTH defined at the commandline

and will include automatic returns while entering text, but they are still reconfigurable with the grips should you need to.

 

Or you can do it within the COLUMNS commandline option

specifying either a static or a dynamic width, and defining it there, in which case it will remain the default, unless you change it.

Dynamic columns are pretty cool, easily reconfigured by dragging the grips.

 

I believe that Lee Mac has some great lisp tools for this sort of stuff on his site too.

differing MTEXT looks.jpg

dynamic columns are cool.JPG

Edited by Dadgad
Link to comment
Share on other sites

if the issue is that you want the Mtext Boundaries flushed with your Mtext width you can use this lisp

 

i don't remember where i got it from but i've been using it for a long time now

 

; Lisp routine for resizing mtext boundaries - where each mtext selected will have its grips flush with the text.
;
(defun c:FX (/ sset en el ymt nmt mtwidth mtcont)
(setq sset (ai_aselect))
(if (null sset) 
 (progn
 (princ "\nNo objects selected.")
 (exit)
 )
)
(setq COUNT 0)
(setq ymt 0)
(setq nmt 0)
(if (/= sset nil)(setq EN (ssname sset COUNT))(setq EN nil))
(WHILE (/= EN nil)
 (setq mtcont nil)
 (setq nel nil)
 (setq EL (entget EN))
 (if (= (cdr (assoc 0 EL)) "MTEXT")
;-------------------------------remove extra spaces-----------------------------
  (progn
   (setq mtwidth (* (cdr (assoc 42 el))1.015))
   (setq mtheight (cdr (assoc 43 el)))
   (setq EL (subst (cons 41 mtwidth) (assoc 41 EL) EL))
   (setq EL (subst (cons 46 mtheight) (assoc 46 EL) EL))
   (if (= (cdr (assoc 90 EL)) 2)
    (setq el (vl-remove (assoc 90 EL) EL))
   )
   (entmod EL)
   (entupd en)
   (setq el (entget en '("ACAD")))
   (if (/= (assoc -3 el) nil)
    (progn
     (setq oheight (assoc 1040 (cdadr (assoc -3 el))))
     (setq nheight (cons 1040 (cdr (assoc 43 el))))
     (setq n-3 (list (cons -3 (list (subst nheight oheight (cadr (assoc -3 el)))))))
     (setq el (vl-remove (assoc -3 el) el))
     (setq el (append el n-3))
    )
   )
   (entdel (cdr (assoc -1 el)))
   (entmake el)
;--------------------------------------------------------------------------------
   (setq COUNT (1+ COUNT))
   (setq EN (SSNAME sset COUNT))
   (setq ymt (1+ ymt))
  )
  (progn
   (setq COUNT (1+ COUNT))
   (setq EN (SSNAME sset COUNT))
   (setq nmt (1+ nmt))
  )
 )
)
(prompt (strcat "\n" (itoa ymt) " Mtext object(s) were resized, and " (itoa nmt) " object(s) were not Mtext."))
(princ)
)

Link to comment
Share on other sites

You are zoomed out too far so the program is enlarging the editing window so you can still read it. Zoom in much closer and try again.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...