Our Friends: Leaflet Printing , Presented by: Talia Cad Software

Sign In

Subscribe

Subscribe to Daily Autocad.


Oct 15
Monday
Autocad, Blocks, Hints & Tips
Replacing 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
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.

Viewed 8,746 times so far... This week: 75 Today: 8 Latest: 4 July 2009, 21:32

Post Tags:

17 Responses to “ Replacing a block in drawing with another ”
  1. 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. I had a lot of trouble using the block and insert windows, this command -block helped me a lot.

    thanks

  3. Conan Witzel

    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.

  4. 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. By the way, I am using CAD 2008.

  6. 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. Interesting :( Please give me a few days. ‘ı’ll try and write what is the problem.

    Thnx

  8. 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. we use block replace from http://www.powerlisp.com it handles attributes and dynamic blocks. does not work with 2009…yet

  10. 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.

  11. Great solution,

    Thanks Drano,

    We want to publish this hip tip on Daily Autocad. Is it possible Drano?

    Regards

  12. Ys go for it, not at all worried.

  13. 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.

  14. 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.

  15. 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.

  16. try the command BATTMAN
    then sync the required block.

  17. 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!


Post a Comment



All content and source © 2008 Daily Autocad | News Plus wordpress theme brought to you by Zidalgo.