AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
*Expert Elite*
Neilw
Posts: 2,341
Registered: ‎09-04-2006
Message 1 of 16 (712 Views)
Accepted Solution

Combine Mtext Paragraphs into one Mtext

712 Views, 15 Replies
05-21-2013 09:43 AM

I have numerous MText paragraphs that I need to combine into a single piece of MText. I want the paragraphs preserved in the final piece. I've found some routines that can combine pieces of MText but I don't know if they preserve the paragraphs.

 

I have DotSoft Toolpac but it doesn't seem up to the task. Can anyone direct me to a tool or code for this?

Neil Wilson (a.k.a. neilw)
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1
WIN 7 64 PRO
HP Pavillion h8xt, i7 2600, 12 GB
RADEON 6450, 1 GB
http://www.sec-landmgt.com

I guess it was a bit vague in the thread. Here is the .LSP I created from the code.

*Expert Elite*
AllenJessup
Posts: 6,176
Registered: ‎05-21-2003
Message 2 of 16 (680 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-21-2013 11:41 AM in reply to: Neilw

Neil,

 

The first piece of code HERE worked for me on one triel. Hope it works for you.

 

Allen Jessup

*Expert Elite*
rkmcswain
Posts: 3,638
Registered: ‎11-13-2006
Message 3 of 16 (678 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-21-2013 11:43 AM in reply to: Neilw

ToolPac Mtext Join (command: MTXJOILIN) won't do what you want?

 

Maybe this will work better?

http://cadtips.cadalyst.com/multiline-text/improved-text-mtext

 

 

*Expert Elite*
Neilw
Posts: 2,341
Registered: ‎09-04-2006
Message 4 of 16 (661 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-21-2013 01:16 PM in reply to: rkmcswain

Randy,

 

The TOOLPAC tools I have don't work with MTEXT, only DText. The command you mentioned is not recognized in my TOOLPAC.

 

I tried downloading and running Join Mtext.LSP but it doesn't seem to function properly in ACAD 2004. When I use it to combine 2 pieces of MTEXT it loses all but a few lines of text.

Neil Wilson (a.k.a. neilw)
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1
WIN 7 64 PRO
HP Pavillion h8xt, i7 2600, 12 GB
RADEON 6450, 1 GB
http://www.sec-landmgt.com
*Expert Elite*
Neilw
Posts: 2,341
Registered: ‎09-04-2006
Message 5 of 16 (652 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-21-2013 01:31 PM in reply to: AllenJessup

I'm having the same problem with the code in that post Allen. When I join 2 pieces of MText it loses all but a few lines of text.

 

I wonder if there is something in the code that is not compatible with ACAD 2004.

 

P.S. I tried running it in 2013 with the same results. Something is wrong with the code.

Neil Wilson (a.k.a. neilw)
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1
WIN 7 64 PRO
HP Pavillion h8xt, i7 2600, 12 GB
RADEON 6450, 1 GB
http://www.sec-landmgt.com
*Expert Elite*
Neilw
Posts: 2,341
Registered: ‎09-04-2006
Message 6 of 16 (646 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-21-2013 01:41 PM in reply to: AllenJessup

I tried the 1MT0, 1MT1,1MT2 code in the post you referenced Allen. It does the job so, Kudos to you for that one.

Neil Wilson (a.k.a. neilw)
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1
WIN 7 64 PRO
HP Pavillion h8xt, i7 2600, 12 GB
RADEON 6450, 1 GB
http://www.sec-landmgt.com
*Expert Elite*
AllenJessup
Posts: 6,176
Registered: ‎05-21-2003
Message 7 of 16 (614 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-22-2013 04:48 AM in reply to: Neilw

Neilw wrote:

I'm having the same problem with the code in that post Allen. When I join 2 pieces of MText it loses all but a few lines of text.

 

I wonder if there is something in the code that is not compatible with ACAD 2004.

 

P.S. I tried running it in 2013 with the same results. Something is wrong with the code.


Neil,

 

I only tried the code once in 2012. It worked as expected there. I'm glad others worked for you.

 

Allen

*Expert Elite*
rkmcswain
Posts: 3,638
Registered: ‎11-13-2006
Message 8 of 16 (610 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-22-2013 05:05 AM in reply to: Neilw

Neilw wrote:

 

The TOOLPAC tools I have don't work with MTEXT, only DText. The command you mentioned is not recognized in my TOOLPAC.


Running ToolPac 14 here. It must be a new tool.

Valued Mentor
gccdaemon
Posts: 468
Registered: ‎09-14-2010
Message 9 of 16 (600 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-22-2013 08:18 AM in reply to: Neilw

Copy....Paste....lol. It's got to do with Paragraph formatting. You could write a Lisp pulling code from STRIPMTEXT and TXT2MTXT and come up with something workable. I try to format my mtext paragraphs using tab dilenation. Here is what I do:

 

1. find/replace the tabs with [tab]

2. set my mtext width to 0

3. explode

4. Add \P to the front of the text lines

5. use TXT2MTXT to rejoin the text.

6. find/replace [tab] with actual tabs.

7. set paragraph setting globally

Andrew Ingram

Civil 3D x64 2012
Win 7 x64 Ultimate
I7 3820 (3.6ghz quad core with HT)
32gig RAM (Corsair XMS3 4x8g)
Intel x z79 mobo (BOXDX79TO 2011 socket)
Radeon HD 7850 2gb GDDR5
*Expert Elite*
Neilw
Posts: 2,341
Registered: ‎09-04-2006
Message 10 of 16 (587 Views)

Re: Combine Mtext Paragraphs into one Mtext

05-22-2013 09:08 AM in reply to: gccdaemon

Actually there is some code in the link Allen posted that does a great job. Look at the code for OneMtext.LSP in the thread.

Neil Wilson (a.k.a. neilw)
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1
WIN 7 64 PRO
HP Pavillion h8xt, i7 2600, 12 GB
RADEON 6450, 1 GB
http://www.sec-landmgt.com
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.