New CADforum look launched.
Over 1.081.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
Over 1.081.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
CAD tip # 8201:
Question
A
The TXT2MTXT command can be used to convert multiple texts to a single Mtext. But if you need to just convert the type of multiple drawing objects from Text to MText - without combining them - you can use the following simple AutoLISP code.
Save it to txt1mtxt.lsp, load it with APPLOAD and start the TXT1MTXT command:
; CADstudio TXT1MTXT - text to mtext (individual) (defun c:txt1mtxt (/ ss lst x) (setvar "CMDECHO" 0) (command "_undo" "_begin") (setq ss (ssget '((0 . "TEXT")))) (setq lst (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) (mapcar '(lambda (x) (command "txt2mtxt" x "")) lst) (command "_undo" "_end") (setvar "CMDECHO" 1) (princ) )
ACAD
*CAD
10.9.2011
18215×
applies to: AutoCAD ·