Wednesday, March 4, 2009

AutoCAD Automation Tools attribute text search and replace

I wanted to share my reply on this user question on AutoCAD Automation Tools. AutoCAD 2010 is also supported.

“I just want to know if it's possible with your software to search for  one attribute value and replace it with an other one.     Because, on the same drawing, I have 5 blocks with the same same and the same tag, but with different value.   I know I can explode block or create unique block name, but the "search and replace value" option could be faster for us.”

Here is how you can search and replace the whole value.

Here is the drawing before with two instances of the same block with values 30109 and 301012.

And here is the result and you can see that only the 30109 value changed to NEW VALUE.

You can also search for 301 and replace it with 456 if you want. That is just a part of a text string.

Before it is showing 30109.

After it is showing 45609.

If you want to replace just a specific part of the text you can also use # around the text in the drawing. This is useful if you have a template drawing you want to use as basis for creation of new drawings. For example find #linenumber1# and replace it with different values in each drawing.

No comments:

Post a Comment

Subscribe to the comments feed

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Subscribe to this blog
JTB World's website | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.