[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Massively Redefine All Blocks in a Drawing
Tip# 4209 By Patrick Hughes On 04-Nov-2013
4.5
Rated By 2 users
Categories : Edit Blocks
Software type : AutoCAD 2014
Rename File To : No Files to download.
Simultaneously update many blocks in one AutoCAD file.

Patrick Hughes describes how he has simultaneously updated many blocks in one AutoCAD file.

"Have you ever found yourself in a position where a large number of library blocks in a drawing need to be redefined? It can be a tedious task, and if you have multiple drawings that need updating it's even worse. The problem is each block in your drawing needs to be inserted individually in order to redefine it in the current drawing. Here is how it can be done to a drawing in one fell swoop.

"Create a new drawing that will contain all of the blocks that need to be updated. We will call this MasterBlock.dwg. Insert the new blocks into your new drawing. Now, here's the trick: Invert the process — rather than inserting the updated block drawing into the working drawing, go the other way, inserting the working drawing into MasterBlock.dwg. This will result in all blocks in the working drawing updating to what is in MasterBlock.dwg.

"Now that the inserted working drawing is updated, WBlock it out to its original name, overwriting it. Or, if you prefer a more cautious approach, WBlock it to a revised file name. Purge the updated drawing from the MasterBlock drawing and you are ready for the next one. I've used this technique to update dozens of blocks at a time, and by using AutoCAD scripts I've successfully updated whole folders of files in a matter of minutes."

Notes from Cadalyst tip reviewer Brian Benton: Updating blocks in a file is really easy: Simply re-insert the block and tell AutoCAD to reload the block file. The problem stated entails doing this for many blocks — perhaps even all of the blocks in your file. When you insert a block, AutoCAD looks to see if that block already exists in the current file. If it does, then the software will use the block that is in the file. This is a good thing, as it keeps you from messing up blocks in your file that you have customized.

This method of updating your blocks is a workaround that gets you there in a backward direction, but it will work. If you try to insert the MasterBlock.dwg file into your current file, AutoCAD will use the versions of the blocks that are in your current file, thus not updating them. Having one file that has all of your blocks in it in standard form can be a very useful thing; in this case, it can be very useful.

 

Average Rating:
4.5


User comments
Comment by Eaton,Nancy
Posted on 2013-11-06 22:06:30
What a quick and easy solution, Brian! Thanks for sharing.
Comment by Ayles,Mark
Posted on 2013-11-15 08:53:41
For a complicated drawing with multiple sheet layouts with multiple viewports and layer states, a quicker way could be to use design center and insert and redefine the modifies blocks from MasterBlock to the existing project drawing. Open design center, select the masterblock drawing, select the block in design center, right click and select "insert and redefine." The old block in the project file is replaced with the one in the masterblock file.