Jump to content
john_waggs

Trying to Automatically update/redefine block in Thousands of drawings

Recommended Posts

john_waggs

Good evening.

I'm hoping that someone here can come through for me with some programming assistance.

 

I currently need to update a gennote block numerous drawings in tons of different folders under one drive (F:\ drive).

 

I would like to get a routine that would start in the F Drive and Automatically go to each subfolder, open each drawing, insert 'gennotes=', erase "last", save the drawing, exit out, and go to the next drawing and do the same.

 

Then move on to the next folder and repeat the process until it makes it through all the folders and dwg files.

 

I started with a batch file that I cannot seem to get to work:

 

FOR /r %%f in (F:\*\*.dwg) DO START /WAIT

C:\"2012"\"Autocad 2012 - English"\acad.exe "%%f" /b

F:\scripts\gennotesupdate.scr

 

Gennotesupdate script:

 

Insert

gennotes=z:\blocks\gennotes

0,0 1 1 0

 

Erase L

 

Save

Y

 

____

That is all I have and Autocad opens but says it cannot find the specified files. I hit OK and autocad remains open. Nothing else happens.

 

If there's a better way to accomplish my task I would appreciate the assistance. Or if this is the best way, any tweaking to make this work would be appreciated.

 

Thanks,

 

John W.

Share this post


Link to post
Share on other sites
Dadgad

Welcome to CADTutor. :)

 

Check out this lisp from Lee Mac

http://www.lee-mac.com/scriptwriter.html

 

it is but one of a great many which Lee very generously makes available for free

on his site. Thanks Lee! :beer:

If this doesn't do it for you, check his other lisps for one that may.

Share this post


Link to post
Share on other sites
john_waggs

Thanks Dadgad but the Google says the link below is invalid and cannot locate.

 

Welcome to CADTutor. :)

 

Check out this lisp from Lee Mac

http://www.lee-mac.com/scriptwriter.html

 

it is but one of a great many which Lee very generously makes available for free

on his site. Thanks Lee! :beer:

If this doesn't do it for you, check his other lisps for one that may.

Share this post


Link to post
Share on other sites
Dadgad

You don't need to Google it, it is an active link in the forum post, :huh:

just left click on it, and it will take you right there to Lee's lisp and his site.

Share this post


Link to post
Share on other sites
JGA

I would use AutoDesk ScriptPro which would get around using batch files - just search for all the dwgs you want & drag 'n drop them onto the scriptpro pane. Also, the ACAD console would run quicker, as it doesn't load the user interface. A very good entry on the topic is found at...

http://www.cadtutor.net/forum/showthread.php?76974-Up-and-Running-with-the-2013-Core-Console&p=519692#post519692

 

I would try adding a .dwg to the end of the drawing/block you want to insert, you could also add "" around the path.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×