Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
New Member
daniel.j.wright
Posts: 2
Registered: ‎06-14-2012
Message 1 of 2 (117 Views)

Script to change duplicate tag names and their values

117 Views, 1 Replies
06-17-2012 06:15 PM

Hi

 

I need to change the value of some tags in a title block on multiple drawings. I tried using Lee Macs attribute changer (http://www.lee-mac.com/batte.html). It works fine but not when tags have the same name.

 

I then looked at this code - http://www.cadtutor.net/forum/showthread.php?51231-Change-Attribute-Tags-for-Blocks-using-Lisp&p=480....

Idea was to change the tag names then use Lee Macs program. It too fails when there are duplicate tag names. It changes all tags not just the one I want.

 

In the the title block I have 3 tags with the name "NAME" but only one will have the value I'm looking to change. Does anyone have any idea if I could place an IF statement some where in the above codes (or another code altogether) to instruct that IF the tag name is "NAME" with value "Dennis (BSL)" then change either the tag name or the value to "Daniel"

 

Im pretty bad at this programming stuff but with so many drawings I need a easier, automated way of doing this.

 

 

Cheers

*Expert Elite*
pbejse
Posts: 2,467
Registered: ‎11-24-2009
Message 2 of 2 (108 Views)

Re: Script to change duplicate tag names and their values

06-17-2012 09:41 PM in reply to: daniel.j.wright

Please refer to your post at CADTT for a possible solution Daniel. Besides the condtions you posted there are not hte same as the one here.

 

 

.... change either the tag name or the value to "Daniel"

 

.... change the tag name from "NAME" to "DESIGN ENG"? <-- as posted on CADTT

HTH

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 or visit the Installation and Licensing Forum to get help installing your software.