iuliandonici Posted May 19, 2011 Share Posted May 19, 2011 I'm simultanously facing a new issue (while checking with this one) where I have around 1100 block references and I would like to know how could I "scan" an entire drawing looking for duplicates and then once I found my 1st duplicate, I can rename the block and move on to the 2nd duplicate and so on... Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 19, 2011 Share Posted May 19, 2011 wow, so you basically want every block to have a unique name. You can use QSELECT or BCOUNT to determine how many of each type you have. Can I ask why this is needed? How do you want to provide the new name? If you have 50 identical "Fred" blocks do you want them to be renamed Fred1, Fred2... Fred50 or the whole drawing Block1, Block2.... Block1100 or are you going to type each new block name by hand? Do they have to remain blocks? If you explode the lot there won't be any duplicate blocks. There is a LISP on this forum to rename individual blocks which can probably be adapted to suit your needs but your needs will need a bit more definition first. And finally, you do know the size of the drawing will increase each time a block is renamed don't you. Quote Link to comment Share on other sites More sharing options...
iuliandonici Posted May 19, 2011 Author Share Posted May 19, 2011 (edited) It's about a 3D naval ship in Autocad 2008 Mechanical. I have around 1150 of blocks, manually inputed across the drawing. These blocks have attributes and with these 1150 blocks, I'm pretty sure I might've slipped - maybe I copied a block from one place to another but forgot to rename its attribute, that's why I need to "scan" the entire drawing. Now, the values of these attributes are not constant, sort of speaking. For example, I can have 500 blocks named liked this "115-N001E ... 218-N500A". The first 3 digits + the letter at the end is a location and N001 to N500 is the block number and only the block number increments by 1, no matter the location, across the ship. I hope I haven't confused you. 1. So, I guess I need to create a way to check for duplicate blocks (and when I say duplicate I mean same attribute's value - see picture attached) and the result could be displayed either in the command terminal or maybe in a .txt file (whichever is easier) or anywhere it is possible but I need to see those blocks. 2. Then, once I know each duplicate block, I have to search for it, locate and rename it manually. In fact, I just want a faster way to do these steps: Views >> 3D Views >> TOP and then Edit >> Find. Maybe some sort of lisp that these 2 steps with one command (less letters for the command, the better). And I don't care about the size of the drawing. Edited May 19, 2011 by iuliandonici stupid Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 19, 2011 Share Posted May 19, 2011 what you want is outside my ability BUT what you want is not what you asked for. To rename all the blocks is a major task and you would notice the drawing size! If you had ONLY blocks in your drawing it would be approximately 1150 times its size after renaming the blocks. What you need to do is just change the attribute value, which is far simpler. I would export all the current values to a .csv file and interogate that file in excel. However I am there are LISP routines already here to help. Sorry I can't help but at least the requirement is now more obvious so somebody should be along soon to point the way forwards. Quote Link to comment Share on other sites More sharing options...
iuliandonici Posted May 31, 2011 Author Share Posted May 31, 2011 (edited) I somehow found some solutions to my needs. For the 1st step, I thought about exporting the block ATTRIBUTES in a .txt file, using Express >> Blocks >> Export Block Attribute Information. From there, I could clearly see what blocks have duplicate attributes or any other issues. Now, I wanted to locate the blocks with "problems". So, I thought about using the 2nd step which is creating a CUSTOM USER COMMAND, naming it "view_top_find". And, it works. Thank you all for your support. Edited May 31, 2011 by iuliandonici being a dumbass, again 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.