john_waggs Posted February 6, 2013 Share Posted February 6, 2013 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. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted February 6, 2013 Share Posted February 6, 2013 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! If this doesn't do it for you, check his other lisps for one that may. Quote Link to comment Share on other sites More sharing options...
john_waggs Posted February 6, 2013 Author Share Posted February 6, 2013 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! If this doesn't do it for you, check his other lisps for one that may. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted February 6, 2013 Share Posted February 6, 2013 You don't need to Google it, it is an active link in the forum post, just left click on it, and it will take you right there to Lee's lisp and his site. Quote Link to comment Share on other sites More sharing options...
JGA Posted February 13, 2013 Share Posted February 13, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.