tzframpton Posted September 11, 2012 Posted September 11, 2012 Hello all, I'm looking to see if there's a LISP routine that exist that can change system variables in multiple drawings without opening them in AutoCAD. For instance, we have 296 DWG files that are "sheets" in a directory, and we'd like to set VISRETAIN to 1 and LAYEREVAL to 0. These two are just a couple examples, there are actually a few more that I might be missing. Before I was at this company, someone forgot to build a template to get things started so now we're having to go back drawing by drawing and fix certain things but before we start tomorrow morning I thought I'd ask. Even if all I can find is something that can globally apply these changes to current open drawings only, that'll still help out a ton. Thanks in advance! - Tannar Quote
Lee Mac Posted September 12, 2012 Posted September 12, 2012 Hi Tannar, You would need to use a Script to iterate over the set of drawings and change the necessary System Variable values in each drawing, as System Variables are unfortunately not accessible from an ObjectDBX interface. If you need help getting a Script set up, let me know. Lee Quote
pBe Posted September 12, 2012 Posted September 12, 2012 You would need to use a Script to iterate over the set of drawings and change the necessary System Variable values in each drawing, as System Variables are unfortunately not accessible from an ObjectDBX interface.Lee 1+ ....Even if all I can find is something that can globally apply these changes to current open drawings only, that'll still help out a ton. - Tannar If those files are to be use internally and not up for submission , go ahead and use that approach and process the file when opened. (acaddoc.lsp) "function-at-the-ready" snippet (mapcar (function setvar) '("VISRETAIN" "LAYEREVAL")'( 1 0)) HTH Quote
BIGAL Posted September 12, 2012 Posted September 12, 2012 You should be able to add the code to the auto startup if you have one and get it to load on opening, trying to think how it was done. Tried adding to startup suite in APPLOAD this seemed to work now I have to turn off "this is a test" I think you would be suprised how quick a script open setvar close can do 260 dwg's I would do over lunch etc. Do say 50 at a time. Quote
tzframpton Posted September 12, 2012 Author Posted September 12, 2012 Ah, didn't even think of utilizing the ACADDOC.LSP file. We definitely had one in place and me beings the CAD Manager of the project I can do something like that.... open 10 drawings at a time in the directory then SAVEALL and CLOSEALL. Lee, thanks for your offer but I'd feel too guilty asking you to whip something up for my company's use. If something didn't exist then I was gonna put the CAD peon's to work, haha. Thanks to all for your responses, I might try the ACADDOC.LSP approach since we'll eventually have to open all drawings before our 100% submittal anyways. Much appreciated, as always! - Tannar Quote
fuccaro Posted September 13, 2012 Posted September 13, 2012 A quick way to a similar problem: http://www.cadtutor.net/forum/showthread.php?19489-How-to-save-higher-version-drg-to-lower-version-drg It is easy to change the lisp to suit your needs Quote
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.