Combine separate text into one string of text - Not Mtext though

I asked this a while back but it was included in a related post.
I need to combine at least 2 text entities (bearing and distance under each other - mainly) to a single line of text.
I have Googled but found nothing.
I know it can be done combine to MTEXT but I just want all on one line.

Any ideas appreciated.

Comments

  • ct.lsp   Works on v14

    (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)
    )

    Source: http://autocadtips.wordpress.com/2012/02/16/autolisp-combine-text/

  • I use the attached.  It is designed to redo word wrap for several lines of text.  Select multiple text entities, then click where the right margin (or left margin for right justified text) should be.  Select a margin point far enough to the right and the selected text will be on a single line.

    rf.lsp

  • Many thanks Robt - works a treat

    Martin yours sounds interesting.
    I can't see an attachment to your post (at this end ie)
  • Well!  Now it is there!!
    Thanks Martin again.

  • Hi Richard,

    You can use the CP_CONS_TXT command in CADPower v 14.17, which now has the ability to consolidate a bunch of text objects into a single TEXT or MTEXT, the choice is yours.

    CADPowerimageText imageEditing imageConsolidate Text into Mtext
    http://www.4d-technologies.com/cadpower/manual/text_tools.htm#CONS_TXT

    Best Regards
    http://rakeshrao.typepad.com

This discussion has been closed.