Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Looking for a way to convert regular text to Mtext other than Express Tools

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
zootango
962 Views, 6 Replies

Looking for a way to convert regular text to Mtext other than Express Tools

Is there a way or a lisp routine that will convert regular text to Mtext and keep the selected lines of text as "single" lines of Mtext?

 

There is an Express Tools routine to convert text to Mtext, but that tool groups all the text you select into one paragraphed Mtext, which I do not want it to do.

 

I want to convert single lines of text to Mtext so that I can then apply a background mask to them so that the area they mask is minimized.

 

When Mtext is paragraphed and the last line is shorter than the others the background mask extends out to the longest line and maskes out areas that I do not want masked.    Single line mtext masked is much more versitile to use in tight spaces.

 

Is there a way to convert multiple lines of text to Mtext and have them keep there individual line status??

6 REPLIES 6
Message 2 of 7
Kent1Cooper
in reply to: zootango

That could certainly be done, but is there any reason not to just Textmask the original pieces of regular Text?

Kent Cooper, AIA
Message 3 of 7
zootango
in reply to: Kent1Cooper

Yeah, don't like using textmask, to many problems.

Message 4 of 7
Kent1Cooper
in reply to: zootango


@zootango wrote:
... I want to convert single lines of text to Mtext so that I can then apply a background mask to them ....
Yeah, don't like using textmask, to many problems.

I don't understand.  Do you mean something other than using Textmask when you say you want to "apply a background mask"?  If you are talking about Textmask, you don't need to convert the Text to Mtext to use it.  And you can use it on as many Text objects as you want all at once, so the selection would be the same as in TXT2MTXT, but without using that Express Tool, and therefore with the Text entities retaining their separateness as you described.

Kent Cooper, AIA
Message 5 of 7
hmsilva
in reply to: zootango


@zootango wrote:

...

There is an Express Tools routine to convert text to Mtext, but that tool groups all the text you select into one paragraphed Mtext, which I do not want it to do.

 

I want to convert single lines of text to Mtext so that I can then apply a background mask to them so that the area they mask is minimized.

...

Is there a way to convert multiple lines of text to Mtext and have them keep there individual line status??


zootango,

 

if you do not mind using the Express Tools "txt2mtxt" routine...

A quick and dirty one

 

(defun c:test ( / ITM NUM SS)
  (if (setq ss (ssget "_:L" '((0 . "*TEXT"))))
    (progn
      (setq itm	0
	    num	(sslength ss)
      )
      (while (< itm num)
	(command "_txt2mtxt" (ssname ss itm) "")
	(setq itm (1+ itm))
      )
    )
  )
  (princ)
)

 

HTH

Henrique

 

EESignature

Message 6 of 7
zootango
in reply to: zootango

Thanks HMSILVA,

 

That's exactly what I needed, works like a charm, thanks so much.

Message 7 of 7
hmsilva
in reply to: zootango

You're welcome, zootango
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost