Big Mike Posted October 13, 2010 Posted October 13, 2010 Is there a way to close all the open (unsaved) drawings without having to confirm each one? I'm in an office that isn't in the same location as our main server, and many Autocad functions are slowed down by the slow connection (or whatever the problem is, IT has be 'working on it' for a long time). I'm on Mechanical 2010. Quote
mdbdesign Posted October 13, 2010 Posted October 13, 2010 Button macro if you need to save and close ^C^C_QSAVE CLOSE Quote
ReMark Posted October 13, 2010 Posted October 13, 2010 Take a minute and read through all of this. It isn't that long. http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Closeall-command-w-no-save/m-p/2662606 Quote
Big Mike Posted October 13, 2010 Author Posted October 13, 2010 Button macro if you need to save and close^C^C_QSAVE CLOSE Thanks, but I'm looking for something that will close All the drawings that I have open. For example, I might have up to 12 drawings open at once. I print them all via Sheet Set Manager (thus they are 'unsaved'), then I want to close all of them, without having to confirm each one (or having to click a button for each one). It's not fast, but it doesn't take long if I don't save each one...but if I do want to save each one, it's excruciatingly slow. What I'd really like, is a 'yes to all' button on the dialog for 'Do you want to save?' Quote
rkmcswain Posted October 13, 2010 Posted October 13, 2010 (edited) Is there a way to close all the open (unsaved) drawings without having to confirm each one? Well, the following code should work in theory, but it chokes at the end and leaves one drawing open. (vlax-for x (vla-get-documents (vlax-get-acad-object)) (vlax-invoke-method x "close" :vlax-false) ) Not to mention that IIRC, this may leave AutoCAD in an unstable state. You may be able to find some more info regarding the above code and/or use it as a start to a better solution... EDIT: looks like the last post in ReMark's link may do it... Button macro if you need to save and close^C^C_QSAVE CLOSE Big Mike wants to "close *multiple* drawings *without* saving". Edited October 13, 2010 by rkmcswain add EDIT Quote
Big Mike Posted October 13, 2010 Author Posted October 13, 2010 Take a minute and read through all of this. It isn't that long. http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Closeall-command-w-no-save/m-p/2662606 Thanks. It looks like it might be what I'm looking for...but I'll have to brush up on my LIPS...I see '(defun' and my eyes glaze over. Quote
mdbdesign Posted October 13, 2010 Posted October 13, 2010 Big Mike wants to "close *multiple* drawings *without* saving". Sorry RKM, misread Quote
RobDraw Posted October 14, 2010 Posted October 14, 2010 I stumbled across this. In express tools there are commands called "SAVEALL" and "QQUIT". I haven't tried it yet but if you hit "SAVEALL" and then "QQUIT" it sounds like all the drawings will close without any prompts. Quote
Big Mike Posted October 14, 2010 Author Posted October 14, 2010 Actually, sometimes I do want to save them...I just didn't want to confirm each one. The SAVEALL combined with CLOSEALL should do the trick for now. Actually, I think that my real problem is the slowness of my system. I'm dealing with rather small & simple DWG files and it's taking up to 9 seconds to save a drawing, or open a drawing...even to open a template. If it was faster, like I expect it to be, it wouldn't be so much trouble. For whatever reason, it's running a lot faster this morning, than it was yesterday afternoon. Now if I can only figure out why it keeps changing my FIELDEVAL from 16 to 0...I can get some work done. Quote
rkmcswain Posted October 14, 2010 Posted October 14, 2010 Actually, sometimes I do want to save them...I just didn't want to confirm each one. The SAVEALL combined with CLOSEALL should do the trick for now. Sorry, my bad. I took "close all the open (unsaved) drawings without having to confirm each one" to mean you wanted to close them without saving. Quote
alanjt Posted October 14, 2010 Posted October 14, 2010 I use this to close all but the active drawing... (defun c:CABA (/) ;; Close all but active drawing (with option to save inactive) ;; Express Tool subroutine "ACET-UI-Message" required ;; Alan J. Thompson, 06.09.10 ((lambda (save) (vlax-for x (vla-get-documents (cond (*Acad*) ((setq *Acad* (vlax-get-acad-object))) ) ) (or (eq :vlax-true (vla-get-active x)) (vl-catch-all-apply (function vla-close) (list x save)) ) ) ) (if (eq 6 (acet-ui-message "Save drawings before closing?" "Close All But Active Drawing" 52)) :vlax-true :vlax-false ) ) (princ) ) 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.