AutoCAD/Updating block in multiple drawings
Expert: Bill DeShawn - 10/7/2010
QuestionI am currently working on a group of dwg files, all
containing the same block (a layout vignet). This block
contains attributes. I have made a small modification to
this block in one drawing. Is it possible to import the
changed block from one file into all the other drawing
files, quickly, and without messing up the attributes? Right
click in design center (autocad 2008) shows 'Insert and
redefine' and 'redefine only' as not selectable. I suppose
these commands would have done the trick, but have no idea
why they don't work. Any idea how I can fix this? Thanks in
advance, T
AnswerTim:
It's been a while since I've been asked about this problem, but a long time ago, I had this problem myself. This was way back on Release 14. There was a LISP routine that was supplied with AutoCAD called "ATTREDEF.lsp". Guess what? I just searched for it on my AutoCAD Architecture 2008 and found it here:
C:\Program Files\AutoCAD Architecture 2008\Support\attredef.lsp
So for AutoCAD is should be here:
C:\Program Files\AutoCAD 2008\Support\attredef.lsp
And all you should need to do is use APPLOAD to load it. Alternatively you can use this lisp command:
(load "attredef")
First, before actually starting the routine, have a redefined block ready. Draw a construction line or ray from the insertion basepoint of the block to anywhere on screen. Make sure the block is not scaled and then explode it. Then, make the layer current where you want all these blocks to reside. (Hopefully they all reside on the same layer, because the ATTREDEF routine does not remember the layer that the blocks are on. They will all be placed on the "current" layer) Now you have the insertion basepoint located. Once the routine is loaded you can just type AT and the <Enter> key to start the routine. Then you type in the name of the block. If you have more than one attribute definition in the block, you will need to select them in the same order you want to see them in when you use ATTEDIT or EATTEDIT to edit the attributes. Do not select the construction line that you drew. After making the object selection, you will need to select an insertion base point for the block. Select the starting point of the line you drew. The entities you select will disappear and all of the blocks with their new nested objects will be their with their old attribute values still intact. If you added an attribute with a new tag to the block, you will have to edit each of the values of all the new attributes in each of the new blocks one by one. You can, however, give the new attribute a default value that may take care of the new attribute values to cut down on editing time.
I think I've covered this pretty well, but if you have any questions whatsoever, please let me know.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn