Replacing a block in drawing with another



Author Orhan Toker
Profession Architect M.Sc.
  Autodesk Authorized Consultant
  Database Specialist
e-mail  

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
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
Fig.2

For more information, you can check AutoCAD lessons in our webpage.

Have a nice day.

Technorati Tags: , , ,

Bu yazinin Turkce’sini okumak icin basiniz.

Similar Posts

Rate this article:

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

9 Responses to “Replacing a block in drawing with another

  • 1
    Raggi_Thor
    April 18th, 2007 23:45

    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.

  • 2
    sygu
    June 16th, 2007 01:04

    I had a lot of trouble using the block and insert windows, this command -block helped me a lot.

    thanks

  • 3
    Conan Witzel
    October 15th, 2007 20:33

    You can also redefine blocks through the Design Center. Mostly useful if it is updating a block that already exists in the drawing.

  • 4
    Kioty_X
    January 31st, 2008 18:46

    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

  • 5
    Kioty_X
    January 31st, 2008 18:48

    By the way, I am using CAD 2008.

  • 6
    Bryan
    April 12th, 2008 01:45

    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

  • 7
    Orhan Toker
    April 12th, 2008 19:13

    Interesting :( Please give me a few days. ‘ı’ll try and write what is the problem.

    Thnx

  • 8
    Ray
    May 14th, 2008 03:44

    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.

  • 9
    Darwin
    May 23rd, 2008 18:34

    we use block replace from http://www.powerlisp.com it handles attributes and dynamic blocks. does not work with 2009…yet

Leave a Reply