Jump to content

Recommended Posts

Posted

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.

Posted

Button macro if you need to save and close

^C^C_QSAVE CLOSE

Posted
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?'

Posted (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 by rkmcswain
add EDIT
Posted

Big Mike wants to "close *multiple* drawings *without* saving".

 

Sorry RKM, misread

Posted

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.

Posted

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.

Posted
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.

Posted

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)
)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...