Jump to content

Updating attributes


Recommended Posts

Posted

Hi!

I was hoping you could help me with an issue I’m having with attributes. I have an entire block library with attributed information. Unfortunately, the “tag” and “prompt” of the attribute are incorrect and need changed (in hundreds of blocks). I can’t seem to find better method then exploding each block and redefining each tag and prompt. Can you think of any way for this? I am currently running AutoCAD Lt. 2006 but have temporary access to a full AutoCAD 2007 seat if that would have a solution.

 

 

Thanks!

Posted

if you have BEDIT you don't have to explode your blocks but its still a mammoth task.

Posted

Ouch...that sounds like something for an intern...or are you the junior of the office?

Posted

VBA?

 

For each Obj in activedocument.modelspace

If Obj.ObjectName = "AcadBlockReference" then

GetAttributes...

For each Attribute

Check the TagString and change it?

Posted
I like Dave's suggestion re: BATTMAN.

 

nice call but lp's suggestion. :lol:
Posted

Thanks for everyone responding.

 

I got a great answer from Mike Williams at auto cad tip of the day

 

Here's what he suggested:

 

Here’s what I’ve come up with. There are 4 ways that come to mind that can probably fix your situation. Most of them require some programming knowledge that would be a little beyond what I can easily explain (depending on your experience with LISP programming and script writing).

1. Buy an external program. This would probably be the easiest and quickest if you can find one. An external program that could handle many drawings at a time and not require you to open each AutoCAD drawing individually would be ideal.

2. The “-ATTEDIT” command will allow you to global edit attributes within a drawing. You may give it a try and experiment with it some, but in the end, it will not fix large quantities of drawings automatically. You would have to have a script file that would open each drawing, run the commands, close, save and open the next drawing.

3. A LISP routine could be written to change the values required and then executed thru a script file as mentioned above.

4. The last solution that I thought of, and one that few people would probably know about, would allow you to make all the changes you need to a drawing without any programming. There would still need to be some sort of batch file/micro/script file to handle the large quantity of drawings, but as far as changing the values one drawing at a time, it’s very simple. Save the drawing as “.DXF” file. Open the DXF file in WordPad. Do a find and replace for the values you wish to change. Save the file and then open the DXF file in AutoCAD and save to DWG.

Let me know if any of this helps or if you have any other questions.

Mike

I went with option #4 and it worked great!

 

I just wanted to let everyone know in case anyone comes along behind me and needs an answer to this as well. And, also wanted to give Mike a plug, since he was so helpful, and he's trying to get his website up and taking off. You can subscribe to his AutoCad tip of the day at: autocadtipoftheday dot com

Posted

A tip to a related issue, although not the problem described here:

A useful command I use for editing the value of an attribute in a drawing is the GATTE command (global attribute edit), which is an Express Tools command. From help:

Command: GATTE

Select block or attribute [block name]: Use an object selection method, or enter B for the block name

Known tag names for block: MDLN.

Select attribute or type attribute name: Use an object selection method or enter the attribute tag name

Number of inserts in drawing = 2 Process all of them? [Yes/No] : If no, select the block inserts to process

Regarding points 1 and 4:

#1 - Several months ago I have used a program called Multi-Batch 9.0 for processing tens of thousands of drawings. Quite cheap to buy and easy to understand, all you need to know is how the Acad command line works.

#4 - Instead of Wordpad, try Notepad++. A free and excellent piece of software, perfect for doing batch processing on text based files like DXF. I've used it in the past for opening 50 lisp files at once and doing a find/replace of a string of text in all files, save them all at once, and then close.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...