Nevik Posted August 10, 2008 Share Posted August 10, 2008 Hi everyone, I've been a lurker here for a while trying to wrap my head around some of the ins and outs of using LISP and ACAD. From searching here and some other CAD/LISP sites I have found some scripts that do more then I want and I have tried to modify them but only with moderate success. I am wanting to create a simple script that will allow me to select a block and change a single attribute's value to something else. I know I can do this with EATTEDIT but it's not as streamlined as I would like. All of my blocks have 12-14 differenct attributes. The only one I am wanting to change by this method is "POSITION". I don't like assigning it as I am inputting the blocks as the value generally changes as my drawing progresses. I do not want to change the attribute in all instances of the block in the drawing, just the instance that I have selected. After I place all my blocks I want to be able to sort by this POSITION to edit the rest of the tags. I update the other attributes through a link with Excel but without knowing the POSITION then the values of the rest all overlap. Or is there any way I could automatically update the POSITION attribute based on location in the drawing? Say I'm placing these blocks on different "pipes/lines" in the drawing. If I name each "pipe" could that somehow be come the name for POSITION? This way if I have 20 blocks on the same pipe I don't need to modify the attribute for each one individually. I imagine something like that is possible but would probably involve updating my existing blocks. Any help with this would be great. I've figured out how to select the block and get a list of all the sub-entities but then I start to stumble. Thanks! Kevin Humphrey Quote Link to comment Share on other sites More sharing options...
TimSpangler Posted August 11, 2008 Share Posted August 11, 2008 Try this one. I use it all the time. http://www.theswamp.org/index.php?topic=10028.msg128497#msg128497 Another goody from Micheal. Quote Link to comment Share on other sites More sharing options...
Nevik Posted August 11, 2008 Author Share Posted August 11, 2008 That seems to do the trick. Hadn't even thought about grabbing the attribute directly. The attribute is usually on a non-visible layer but it's a simple matter to make it visible to edit then hide it again. Really nice that it loops itself too. Thanks! Kevin 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.