Jump to content

Replace specific text with closest mtext


MP7

Recommended Posts

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

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...