Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
MadDaffy
Posts: 13
Registered: ‎07-14-2011
Message 1 of 8 (1,212 Views)

Automating changes to Title Block date attribute

1212 Views, 7 Replies
07-18-2011 08:14 AM

I'm using Autocrat 2004.

I have a attributed titleblock. Sometime in the future I will need to change the date attribute to another value, i.e.. 7-11 to 9-11.

 

I can't place a text string in the title block because this title block is used for multiple drawings and the date will be different for different sets. I can't have numerous title blocks because of the client's requirements.

 

Question:

Is there a way to write a script to open a drawing, look for the specific attribute, change the date value, save and close the drawing - across multiple sheets? Would a lisp routine called by the script be able to do this? Or a script file called by the original script file? CAn you even use a script file in this manner?

 

Any suggestions?

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 8 (1,190 Views)

Re: Automating changes to Title Block date attribute

07-18-2011 12:59 PM in reply to: MadDaffy

You can assign a field that is controlled via the Sheet Set Manager. However you can only have one sheet set assigned per sheet. So you could have all of the dates change at the same time. However only for that project.

 

You need to have the titleblock setup for each project separately.

---------------------------



(defun botsbuildbots() (botsbuildbots))
Distinguished Contributor
caldicad
Posts: 111
Registered: ‎03-27-2008
Message 3 of 8 (1,171 Views)

Re: Automating changes to Title Block date attribute

07-19-2011 04:52 AM in reply to: arcticad

Try this - scroll down to the Editor part. It allows the user to batch change attribute values to drawings without opening AutoCAD.

 

http://lee-mac.com/macatt.html

 

Cheers,

 

Steve.

Contributor
MadDaffy
Posts: 13
Registered: ‎07-14-2011
Message 4 of 8 (1,164 Views)

Re: Automating changes to Title Block date attribute

07-19-2011 06:58 AM in reply to: caldicad

Steve,

 

Read your e-mail, found your program, loaded it up, ran it, and it locked my machine up three times in a row. It will work with Autocad 2004- right?

 

Your program looks great. I just can't get it to work.  Also how do I get the editor to work without opening autocad?

 

Distinguished Contributor
caldicad
Posts: 111
Registered: ‎03-27-2008
Message 5 of 8 (1,159 Views)

Re: Automating changes to Title Block date attribute

07-19-2011 08:27 AM in reply to: MadDaffy

Firstly I have to say it's not my program but Lee Mac's.

 

Apologies I don't know if it will run on 2004 but I'm guessing there should be a contact email address for Lee on the website.

 

Fire him off an email and ask. If you don't get any joy why not download and instal the 30 day trial version of AutoCAD 2012 and rename your attributes using that.

Contributor
MadDaffy
Posts: 13
Registered: ‎07-14-2011
Message 6 of 8 (1,156 Views)

Re: Automating changes to Title Block date attribute

07-19-2011 08:54 AM in reply to: caldicad

I went back and re-read your e-mail and relized it wasn't your program. I was able to get the program to run. The program looks like it will work for us.

 

The caveat for anyone reading this is to practice with copies and make sure you understand what is going on. I didn't understand that I had to remove from processing any tag I didn't want changed. Hence not only did the altered attributes update so did the attributes that were active in the original drawing. By this I mean it took the information from the drawing I was in and redid the titleblock information across 25 sheets to be the same as the original. So I had 26 sheets where the title block info was the same, including the drawing number. I was able to get the drawings back to their original state, thankfully.

 

 

New Member
daniel.j.wright
Posts: 2
Registered: ‎06-14-2012
Message 7 of 8 (1,008 Views)

Re: Automating changes to Title Block date attribute

06-14-2012 09:20 PM in reply to: MadDaffy

Hi,

 

Just trying the global attribute editor and it looks unreal. Exactly what I need. Currently I'm changing one name in the title block on A LOT of drawings. Tried the editor on a test and it worked perfectly. Problem is the title block I'm working with (supplied by customer) has 3 tags named 'NAME'. Is there a way of changing only one tag named 'NAME' as it currently changes all 3?

 

Or does anyone know of a program that will allow me change the name of tags in the title block of all the drawings so I could then use this program?

 

 

Thanks alot

Daniel

Distinguished Contributor
caldicad
Posts: 111
Registered: ‎03-27-2008
Message 8 of 8 (983 Views)

Re: Automating changes to Title Block date attribute

06-16-2012 02:54 AM in reply to: daniel.j.wright

Daniel,

Personally I would Wblock out the title block containing three versions of Name, rename them Name1, Name2 and Name3.

Then reinsert that block into the drawings - you may need to use AttSync to push the sttributes ti update.

If it's over a lot of drawing I'm guessing you could write a script to speed things up.

Cheers,

Steve.

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.