AutoCAD 2010/2011/2012

Reply
Active Contributor
bustr
Posts: 46
Registered: ‎01-23-2002
Message 1 of 7 (676 Views)

Deleting Duplicate Attribute Tags

676 Views, 6 Replies
03-28-2012 06:26 AM

I have hundreds of drawings with attributes that are duplicated. I can't go through each individual drawing, call up BATTMAN and delete them one by one. I need a way to automate the process. The duplicates always show up in EATTE and show up most of the time in BATTMAN. I need a lisp that will find and delete duplicates shown in RED while leaving the originals intact.

 

Can anyone help?

 

 

EATTE.gif

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 2 of 7 (649 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 07:55 AM in reply to: bustr

Hi,

 

deleting the AttributeReferences can be solved with a little programming. But then you will miss some text in your blocks. I estimate it's a titleblock you show in your screenshot, if you delete now 2 times the Attribtue DWGNO the text also will be deleted from your titleblock.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
bustr
Posts: 46
Registered: ‎01-23-2002
Message 3 of 7 (644 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 08:26 AM in reply to: Alfred.NESWADBA

I plan on renaming the border to the name of a more up-to-date block which only has a single occurence of these attributes. Then I'll insert the new block to redefine the old one. If I can get rid of these duplicates before re-defining it then I'll be able to retain the values of those that are left.

 

I also need to delete them so my Lisp that renames the tags will work. It won't work when there are duplicates. I got the lisp and the code for renaming from a thread over at AUGI. 

 

I'm not a programmer. Do you have a lisp that will delete the duplicates and leave one instance of each?

 

Thanks

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 4 of 7 (638 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 08:46 AM in reply to: bustr

Hi,

 

Up to you:

  • upload one drawing (where I can run tests)
  • describe the way you like to have the tool working (single select each block, or given by blockname and do for the whole drawing, define AttributeTag's or take anyone found to be double, always leave the first occurance of a AttRef with a specific TAG or you want to select it in the drawing, or...)

And I will look if I can make such a tool and upload it.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
bustr
Posts: 46
Registered: ‎01-23-2002
Message 5 of 7 (633 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 09:25 AM in reply to: Alfred.NESWADBA


Some of the attribute tag names are the same but the ones listed below are not. Basically I just need a way to transfer the information from the attributes' values from the old to the new. If it were only a few drawings I would use battman to eliminate the duplicates and change their names one at a time, apply and synchronize. This works but I have hundreds of drawings and doing them one at a time isn't practical

old_border COUNT new_border COUNT

04-16-90 (2) START_DATE (1)
04-17-90 (2) CHKD_DATE (1)
04-18-90 (2) APPD_DATE (1)
F.T.D. (2) DRAWN_BY (1)
C.B. (2) CHECKED_BY (1)
APP (2) APPD_BY (1)
DES-0 (1) DESC-0 (1)
DES-1 (1) DESC-1 (1)
DES-2 (1) DESC-2 (1)
DES-3 (1) DESC-3 (1)
DES-4 (1) DESC-4 (1)

 

The following tags are the same in both borders but are duplicated in the old. Thus when I rename the old to the new and redefine it I have multiple instances in EATTEDIT and on the drawing. Whe I synchronize them their values are lost.

DWGNO (3)
TITLE1 (2)
TITLE2 (2)

Active Contributor
bustr
Posts: 46
Registered: ‎01-23-2002
Message 6 of 7 (609 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 01:02 PM in reply to: bustr

Argh! The drawing I attached had an old_border block that was already repaired and didn't have duplicates. Here is a corrected copy.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 7 of 7 (587 Views)

Re: Deleting Duplicate Attribute Tags

03-28-2012 11:19 PM in reply to: bustr

Hi,

 

>> Whe I synchronize them their values are lost.

Yes, that is what I mentioned above. And therefor there have to be rules defined before an automatism can start.

Additionally the new titleblock looks very different to the old one, the positions of the attributes changed (or were lost?). E.g. if I would take the second red occurance of TITLE1 was written in the old block on the left side vertically. I have no idea what I should do with this in a tool.

So we are back at: it has to be defined before a tool may be written.

 

And just to be honest: first thread item was started with "how to delete duplicate attributes", now we are at convert through hundreds of drawings a old titleblock against a new one. It now looks to me as it's more effort that I'm used to give free in a forum (as this is special for you and not globally usefull).

In your case the program would have to check

AttRef "TITLE1" at position x1,y1 ..... has to be converted to XXXXX

AttRef "TITLE1" at position x2,y1 ..... has to be converted to ....

 

Try to give an exact description for each Attribute (TAG and the position within the old block) to the TAG in the new block. I'll look then once more (but without any promise).

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube