AutoCAD Civil 3D General Discussion

Reply
*Expert Elite*
Neilw
Posts: 2,222
Registered: ‎09-04-2006
Message 1 of 14 (503 Views)
Accepted Solution

Combine Mtext Paragraphs into one Mtext

503 Views, 13 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
*Expert Elite*
AllenJessup
Posts: 5,787
Registered: ‎05-21-2003
Message 2 of 14 (471 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,163
Registered: ‎11-13-2006
Message 3 of 14 (469 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,222
Registered: ‎09-04-2006
Message 4 of 14 (452 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,222
Registered: ‎09-04-2006
Message 5 of 14 (443 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,222
Registered: ‎09-04-2006
Message 6 of 14 (437 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: 5,787
Registered: ‎05-21-2003
Message 7 of 14 (405 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,163
Registered: ‎11-13-2006
Message 8 of 14 (401 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: 457
Registered: ‎09-14-2010
Message 9 of 14 (391 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,222
Registered: ‎09-04-2006
Message 10 of 14 (378 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs