MP7 Posted November 10, 2017 Share Posted November 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Bibix Posted November 10, 2017 Share Posted November 10, 2017 i don't know if it will help you, but lee-mac have a lisp to change the base point of a bloc without moving the block? http://www.lee-mac.com/changeblockinsertion.html Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 10, 2017 Share Posted November 10, 2017 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted November 10, 2017 Share Posted November 10, 2017 If you're using AutoCAD LT like your profile shows, then you can't use lisp. Quote Link to comment Share on other sites More sharing options...
MP7 Posted November 10, 2017 Author Share Posted November 10, 2017 @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 Quote Link to comment Share on other sites More sharing options...
MP7 Posted November 10, 2017 Author Share Posted November 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 11, 2017 Share Posted November 11, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.