Here is a useful way to combine two text objects. You can even combine DTEXT objects with MTEXT and vice-versa…
Here’s how:
- CT <enter> to start Combine Text
- Select the first text object. (this will be the base text object that the next text object will be added to)
- Select the second text object.
~enjoy
(princ "\CT.LSP (Combine Text) - Matt Pittman\n") (defun C:ct (/ );1strg text1 t1 spc 2strg text2 t2 comb) (setq 1strg (entget (car (entsel "\nPick 1st Text.. ")))) (setq text1 (assoc 1 1strg)) (setq t1 (cdr (assoc 1 1strg))) (setq spc " ") (setq 2string (entsel "\nPick 2nd Text.. ")) (setq 2s (car 2string)) (setq 2strg (entget (car 2string))) (setq text2 (assoc 1 2strg)) (setq t2 (cdr (assoc 1 2strg))) (entdel 2s) (setq comb (strcat t1 spc t2)) (setq comb (cons 1 comb)) (setq 1strg (subst comb text1 1strg)) (entmod 1strg) (princ) )
great lisp – can it be enhanced to combine more than 2 items of Dtext on a single line?
i thik there is no option for more than 2 items
you can try first 1 and 2
then combine 1,2 and 3
I copied the code but it is deleting the first line that has been selected.
error that pops up is “error cons1