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 (130 Views)

Script to change duplicate tag names and their values

130 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,511
Registered: ‎11-24-2009
Message 2 of 2 (120 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.