PDA

View Full Version : Fixing a block that uses same name attributes without losing existing block data during BATTMAN sync



elmoleaf
2011-02-18, 09:21 PM
Here's a solution that may help someone:
I was recently given a cad plan that had room tags in it comprised of three attributes:
"room_name"
"room_name"
"room_no"
Someone apparently had copied the room name attribute without renaming it in order to create a block with two lines for the room name.
If I edited the block attribute names to "room_name1" and "room_name2", and then used BATTMAN to sync the revised block definition, every instance of the block in the drawing lost the values for those attributes and left only the room number portion of the block.

How I fixed it:
1. Selected all of the room tag blocks and used ATTOUT to create a txt file of the block attritbute values.
2. Edited the block definition to change attribute names to "room_name1" and "room_name2".
3. Used BATTMAN to update all of the inserted blocks to have the renamed attributes (which made the room name data disappear from each block instance).
4. Opened the txt file and renamed the two "room_name" titles in it to "room_name1" and "room_name2" to match my revised block.
5. Used ATTIN and this txt file to import the room name values to all of the existing blocks.

aaron.holmes962672
2012-06-05, 10:15 PM
Just helped me a /whole/ bunch.
Except it was four "ROOMNAME"s, 1100 blocks, and between this and my lisp routine that replaced them all once I could isolate the text on each line, it worked. I probably wouldn't have found this solution on my own.
Thanks!!!
//Aaron.

irneb
2012-06-06, 12:28 PM
Sounds like my advise here: http://forums.augi.com/showthread.php?95968-Attribute-Pains&p=942285#post942285
;)