Jump to content
MP7

Replace specific text with closest mtext

Recommended Posts

MP7

Hello guys,

 

I have a drawing where someone used mtext as names for specific blocks, I need to extract the coordinates for those blocks but the mtext base point is not where the block base point is.

Therefore I just put an attribute definition with the " * " sign and I have to manually replace it with the mtext number., so I can later use eattext to extract coordinates.

Since I have a huge number of those symbols (around a thousand in the drawing) I was hoping if there is a lisp that would replace the * with the closes mtext content.

 

I'm attaching an example of what I have in the drawing, basically the * needs to change to 4885.

Is there a lisp that does something like that?

 

Thx.

 

damn.dwg

Share this post


Link to post
Share on other sites
ronjonp

If you're using AutoCAD LT like your profile shows, then you can't use lisp.

Share this post


Link to post
Share on other sites
MP7

@Bibix

yeah I know about that one, unfortunately it's no help...

 

@SLW210

thank you, sorry about that, my bad

 

@ronjonp

no ron I'm on a full version, never mind about the profile

Share this post


Link to post
Share on other sites
MP7

I've found this useful script that let's me copy(or swap) text which would also help me, it's a solution where I will have to do a huge number of clicks but again shorter than clicking at least twice to edit each * sign

The only problem with this script is that it keeps repeating the text you originally selected, I would need one that asks for input after it has done one copy/swap

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

Share this post


Link to post
Share on other sites
BIGAL

I think the best thing to do is to redo the #ptnum block over again including the attribute. You can make attributes visible or not so could have ptnum turn off.

 

How did you get the pts in the first place was it a csv file P,N,E,Z,D etc even with LT you can do some pretty detailed stuff in excel that would fix this problem so the Block and mtext are correctly related.

 

In civil software this is common and in CIV3d you have styles to do this.

 

Lastly you could cross relate the block insertion point to the mtext insertion pt via a max distance and redo the mtext at correct ins pt, lower left, right justified etc. But sorry not about to spend a lot of time trying to retro it. Move forward and fix for next time. Steven-g may have something he is a wiz at Excel & LT.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×