Convert multiples text labels into seperate mtext regrouped mtext

Convert multiples text labels into seperate mtext regrouped mtext

cyberflow
Advisor Advisor
1,152 Views
6 Replies
Message 1 of 7

Convert multiples text labels into seperate mtext regrouped mtext

cyberflow
Advisor
Advisor

Hello,

I am trying to find a lisp that can do this : 

I've received a drawing containing tons of label in seperate text lines.
They are all parallele (same angle) but with 0.6 distance between each text (See print screen)

 

2016-10-25_111709.png

 

The purpose of the lisp will bee to regroup all of the concerned labels into a single mtext (that could be verified with the distance offset)

I dunno if it's complicated to accomplish ?

I do have a lot to sort and it will automate the procedure.

2016-10-25_111736.png

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Accepted solutions (1)
1,153 Views
6 Replies
Replies (6)
Message 2 of 7

gustavobernardi
Advocate
Advocate

The command TXT2MTXT (EXPRESS TOOLS) Not solve this?

0 Likes
Message 3 of 7

Kent1Cooper
Consultant
Consultant

@cyberflow wrote:

.... tons of label in seperate text lines.
They are all parallele (same angle) but with 0.6 distance between each text ....

 

The purpose of the lisp will bee to regroup all of the concerned labels into a single mtext (that could be verified with the distance offset)
.....


Am I correct in assuming that you mean you want to regroup all of each related group of Text lines into its own separate Mtext object, and not all of them in the entire drawing into one [as the boldfaced part above implies, to me]?  And that "verified by the distance offset" means something like "found to be within the limited distance of each other" as a way of deciding which ones are part of a related group?  If so, using the TXT2MTXT suggestion would require you to go around and pick all of those groups separately, which I assume is not what you want to do.

 

It might be possible, but a question arises:  How close to each other are the closest groups?  If a routine takes a piece of Text and reaches out around it with an expanding crossing window looking for more nearby, until it goes a couple of steps without finding any more, is there any chance it might find something that belongs in another group than the one related to the initial piece of Text?  Or are the groups, at their closest, still far enough apart from each other to prevent that?

Kent Cooper, AIA
0 Likes
Message 4 of 7

Ranjit_Singh
Advisor
Advisor

Looks like they all came from mtext or from blocks as attributes. Verify from the source if they have the original file with mtext. If so, problem solved. If they came from blocks that were exploded then still it would be helpful to go back t the block status. Now you can iterate through the collection, explode each block at a time and then combine the resulting entities into mtext.

 

If both of those fail for you, then post your original drawing (in its entirety) so someone can try to help you. Right now based on your screenshot there are too many unknowns.

0 Likes
Message 5 of 7

cyberflow
Advisor
Advisor
Hi Kent, Yes it's correct. I'd like to have a routine that selects the type "TEXT" that has the same orientation (angle) and the same offset (0.600). Then i'd like it to groupe into one single "MTEXT" with the selected objects. They always have 0.600 of distance between their insertion points. And they have the same angle. So i guess a correct way of verifying if they are ok is that they are at 0.600 and same angle. That would eliminate the possibility to group non related text's.

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Message 6 of 7

cyberflow
Advisor
Advisor
@ Ranjit.Singh : It's the original file and it's how it's built. @gustavobernardi : Unfortunatly no.

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Message 7 of 7

gdefilo
Advocate
Advocate
Accepted solution

Hi cyberflow,

 

maybe this tool from Lee Mac will help:

 

http://www.lee-mac.com/text2mtext.html

 

Hope this helps,

Giancarlo

 

0 Likes