Monday
Autocad, Blocks, Hints & TipsReplacing a block in drawing with another
AutoCAD 9 and higher versions
Hello Daily AutoCAD readers,
Today, I would like to give an answer in this article to a general question that is being asked all the times about blocks, that is replacing a block in a drawing with another block. In other words, we have a drawing and we have many table blocks in it. You would like to replace all of these blocks with another by using just one command. You can use two different methods to do this. One way is to redefine the block. However, this method can only be used for simple blocks or for those block definitions that we do not have in our hand at that moment. If you have the new version of the block in you hand, then you can use the second method that I will define here.
For example, suppose that you have four numbers of rectangle blocks as shown in Fig. 1 and you want to replace them with a block definition that is available in you hard disk at the moment.

Fig. 1 Blocks that you would like to replace with another.
Let’s say that the block that you want to replace with exists with name “circle.dwg” under “c:\temp” folder, and the name of the block that you want to replace is “rectangle”. Now, you are ready to replace rectangle blocks in you drawing with circle block definitions. Let’s follow the command line as mentioned below:
Command: -insert(*)
Enter block name or [?] : rectangle=c:\temp\circle
Block "rectangle" already exists. Redefine it? [Yes/No] : y
Block " rectangle " redefined
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/ Scale/ X/ Y/ Z/ Rotate]: *Cancel*
(*)Hint: The reason why we are using –insert from the command line is to leave dialog box out-of-use. In order for any dialog box used in AutoCAD commands to put out-of-use, you can use “-” character in front of AutoCAD commands.
When the command asks you the block definition name “rectangle=c:\temp\circle” answer means “I would like to replace all of the rectangle blocks inside the drawing with circle blocks under c:\temp directory!”. After this, AutoCAD will prompt that rectangle block exists inside the drawing, and asks you if you would like to replace it with another or not. As you give yes answer and continue, than you will see that all of the rectangle blocks inside the drawing is replace with circle block definitions. However, do not forget that the name of these blocks is still rectangle and if you want to insert these blocks again, then you have to use rectangle name again.

Fig.2
For more information, you can check AutoCAD lessons in our webpage.
Have a nice day.
Technorati Tags: AutoCAD, blocks, block replace, Daily AutoCAD
Bu yazinin Turkce’sini okumak icin basiniz.
Viewed 8,746 times so far... This week: 75 Today: 8 Latest: 4 July 2009, 21:32Post Tags:
Related Posts
Popular
- Hip tip: Increasing view resolution with VIEWRES system variable
07/03/2009 04:39 am
7 Comments - Sirince – IZMIR
07/02/2009 11:02 am
1 Comment - Visual LISP: Programming user interfaces with OpenDCL
07/01/2009 10:15 pm
10 Comments - 3D Modeling 7: EXTRUDE
06/30/2009 02:14 pm
10 Comments - Ask DailyAutoCAD: Which Notebook to Buy?
06/30/2009 12:17 pm
1 Comment
Featured Articles
- AutoCAD 2009 Update 3 Released
- Speed Up As AutoCAD 2009 Ribbon Menu Helps You!
- MEP Analysis Extension for AutoCAD MEP extended to March 31, 2009
- Recap of AutoCAD-related technologies on Autodesk Labs
- Technology Preview of MEP Analysis Extension extended to 12/31/08
- Autodesk Labs: Forward and Backward utility for AutoCAD
|

Apr 18, 2007
Reply
You could rename the block first so the name is Circle and not Rectangle. Then insert the Circle.dwg or draw a new circle and (re)define the Circle block.
Jun 16, 2007
Reply
I had a lot of trouble using the block and insert windows, this command -block helped me a lot.
thanks
Oct 15, 2007
Reply
You can also redefine blocks through the Design Center. Mostly useful if it is updating a block that already exists in the drawing.
Jan 31, 2008
Reply
Ok, my dilema is with…
express}–>blocks}–>replace block with another block
I have a detail sheet with old detail title info blocks that I need to replace with our newer dynamic block with look-ups and (more) attributes. However when I go to replace all with one it gives me this…
Select an object with the desired block name…
Select objects: *U138
Invalid characters in block name.
The following characters are invalid:
\/”:?*|,=`
Now the *U138 (upon listing) is the anonomous name for a multiple block placement. Is there anyway to change this name and or its auto naming process so it doesn’t include invalid characters so the block replace can work like it is sposed to. Now I could refedit each individual “block” placement which would break its link to the rest and become its own independant block with its own name (”block1″, “block2″, “block3″ and so on) which also disposes of its need to have the secondary/anonomous names for a mulitple block placement. Then I can sync it in the block attribute manager to finish updating/replacing the block. However this is time consuming when you have 50 some odd block placements to replace. Seems to be just as fast to replace each block and transfer any attribute info one at a time, which seems kinda R-14ish…
Any ideas or suggestions?
Thank you for your time,
X
Jan 31, 2008
Reply
By the way, I am using CAD 2008.
Apr 12, 2008
Reply
I am trying to replace a block with another block which has 2 text attributes. The block name changes and new blocks are fine, but existing blocks do not have the attributes. AutoCAD 2007
Apr 12, 2008
Reply
Interesting
Please give me a few days. ‘ı’ll try and write what is the problem.
Thnx
May 14, 2008
Reply
I am am also trying to replace blocks with blocks which have attributes. The blocks change, but the new blocks don’t have any attributes. AutoCad 2006.
May 23, 2008
Reply
we use block replace from http://www.powerlisp.com it handles attributes and dynamic blocks. does not work with 2009…yet
Jul 10, 2008
Reply
If you have ACAD 2009, and wish to update blocks and still retain their information or attributes, the process is quite simple just a tad long winded:
open drawing caontaining new block (same name as old) > copy and paste block to current drawing > “block” command > pick point (base point) > type in block name (same as current) > under “objects” select “delete” > ok > “blockname is already defined – do you want to redefine?” click YES.
Though you could use the adcenter command and create a tool palette to house your new blocks if updating a large number, in such a case you need only right click the block on the palette and select redefine.
the rest should happen magically.
if stuck, see my website link to email me.
Jul 10, 2008
Reply
Great solution,
Thanks Drano,
We want to publish this hip tip on Daily Autocad. Is it possible Drano?
Regards
Jul 30, 2008
Reply
Ys go for it, not at all worried.
Jul 30, 2008
Reply
Another shorter way of doing the same thing, is to extract the block to design center, and then right click>redefine on the palette with the current file open.
Sep 5, 2008
Reply
When I replace a block that has attributes in it with another block that also has attributes in it but are different, how come the original block attributes stay with the new block. The block name has changed and any entities have changed, but the attributes have remained the same. Is there another step i can take to remove the old attributes.
Sep 5, 2008
Reply
also when i go into the block editor the attributes are correct for the block i replaced but they don’t show in the blocks in the drawing.
Sep 8, 2008
Reply
try the command BATTMAN
then sync the required block.
Jan 29, 2009
Reply
If you have an attributed block that needs to be redefined or in this case; redefining old block while inserting new blocks try this:
-insert
blockname=blockname (this forces a redefine)
redefine? [y/n] Y
then just pop in the new blocks as you normally would.
You should probably run battman and sync the blocks
Best of luck!