PDA

View Full Version : Globally convert text to mtext


Stephen.Walz
2006-11-28, 05:09 PM
Does anyone know of a routine that will globally convert text to mtext?

There are well over a hundred strings of text in this one particular drawing that need to be converted into individual mtext entities. I'd rather not have to select each text string to convert.

Any help would be much appreciated.

Thanks

Steve

BrenBren
2006-11-28, 05:13 PM
Does anyone know of a routine that will globally convert text to mtext?

There are well over a hundred strings of text in this one particular drawing that need to be converted into individual mtext entities. I'd rather not have to select each text string to convert.

Any help would be much appreciated.

Thanks

Steve

If you scroll down, you will see a similar threads tool; there are few threads listed there that might help you.

Opie
2006-11-28, 06:23 PM
According to R.K.McSwain in this thread, convert all text to mtext, there is a Third Party Solution.

Robert.Hall
2006-11-29, 02:18 PM
What about a routine that converts back and forth?

Wouldn't that be worth more?

rkmcswain
2006-11-30, 03:27 PM
What about a routine that converts back and forth?

Wouldn't that be worth more?

MTEXT to TEXT can be done using ._EXPLODE

kpblc2000
2006-11-30, 03:47 PM
For transformation text in mtext it is possible to take advantage Exress Tools - txt2mtxt. It is possible also variant of the decision to make...

Robert.Hall
2006-11-30, 07:08 PM
MTEXT to TEXT can be done using ._EXPLODE

I hear you 100% however I still think a routine would be more appropriate.
The routine could be set to automatically grab all text objects.

Opie
2006-11-30, 07:25 PM
I hear you 100% however I still think a routine would be more appropriate.
The routine could be set to automatically grab all text objects.
You may want to adjust that a bit to MTEXT objects. ;)

BrenBren
2006-11-30, 07:30 PM
I hear you 100% however I still think a routine would be more appropriate.
The routine could be set to automatically grab all text objects.

I would think that would be easy enough to create - but it's just as easy to do a qselect of all mtext and explode 'em that way too ~shrug~

kennet.sjoberg
2006-11-30, 11:04 PM
. . . and to reverse ? ?
that is the sticky task. . .

: ) Happy Computing !

kennet

Tom Beauford
2006-12-04, 05:57 PM
MTEXT to TEXT can be done using ._EXPLODEI hear you 100% however I still think a routine would be more appropriate.
The routine could be set to automatically grab all text objects.Keep in mind that you will loose all your formating converting MTEXT to TEXT. Trouble if you use multiple fonts, symbols, fractions etc... What purpose would there be to do a conversion like that anyway?

Tom Beauford
2006-12-08, 09:45 PM
Does anyone know of a routine that will globally convert text to mtext?

There are well over a hundred strings of text in this one particular drawing that need to be converted into individual mtext entities. I'd rather not have to select each text string to convert.

Any help would be much appreciated.

Thanks

SteveYou will still need to select them, but this routine will convert them individually:(defun c:mtxt2mtxt( / *error* ss ss1)
(defun *error* (msg)
(if docobj (vla-endundomark docobj))
(cond
((member msg
'("Function cancelled"
"quit / exit abort"
"console break"
)
)
)
((princ (strcat " Error: " msg)))
)
(princ)
)
(prompt "\nSelect Text items to convert to Mtext.")
(setq ss(ssget '((0 . "Text")))
count(sslength ss)
docobj(vlax-get-property (vlax-get-acad-object) "ActiveDocument")
)
(vla-startundomark docobj)
(while (>= count 0)
(setq ss1(ssname ss count)
count(- count 1)
)
(command "txt2mtxt" ss1 "")
(princ)
)
(vla-endundomark docobj)
(princ)
)