close all

Discussion in 'AutoCAD' started by domenico, Mar 31, 2005.

  1. domenico

    domenico Guest

    Hi
    I need
    "close all dwg saving them before"
    "close all dwg without saving them before"
    "save all dwg".

    Is there something already done ?

    Thanks

    Domenico
     
    domenico, Mar 31, 2005
    #1
  2. domenico

    Shane-W Guest

    found this at:
    http://mysite.verizon.net/~vze2vjds/saveall.lsp

    found by google ....

    ;; SaveALL command for AutoCAD 2000 ;; ;; Saves all currently open drawings that have ;; been modified since opened or last saved. ;; ;; Warning: Use entirely at your own risk. (vl-load-com) (defun C:SAVEALL () (vlax-for doc (vla-get-Documents (vlax-get-acad-object) ) (if (and (= :vlax-false (vla-get-saved doc) (vla-get-readonly doc) ) ) (progn (write-line (strcat "\nSaving " (vla-get-name doc) ) ) (vla-save doc) ) ) ) (princ) )
     
    Shane-W, Mar 31, 2005
    #2
  3. domenico

    domenico Guest

    Thanks.
    But "Save all" is easy.
    I want close them too.
    (with the options "save" and "don't save")

    domenico
     
    domenico, Mar 31, 2005
    #3
  4. domenico

    Shane-W Guest

    have you tried modifying the code to issue a close command?
     
    Shane-W, Mar 31, 2005
    #4
  5. domenico

    Jeff Mishler Guest

    From the FreeStuff page at that site:
    " These custom AutoCAD tools and utilities are free for personal use, but
    are copyrighted works and are not public domain. You are free to use them
    for personal use, but you may not sell, lease, or mass-redistribute them on
    disk or electronically. You may not post them online (including web sites,
    ftp sites, bulletin boards, and other online services) for public
    downloading."
     
    Jeff Mishler, Mar 31, 2005
    #5
  6. domenico

    John Laidler Guest

    There is a really nice program to download from Cadwerx called docbar.
    This has a feature to close all with save, and close all no save. Also, its
    a great tool to switch between opened drawings.

    http://www.cadwerx.net/
     
    John Laidler, Mar 31, 2005
    #6
  7. domenico

    domenico Guest

    Yes.
    All is very easy (. . . I'm very lazy today . . .)

    (defun :DWG_CLOSE_ALL ( / active-doc )
    (setq active-doc (vla-get-activedocument (vlax-get-acad-object)))
    (vlax-for doc (vla-get-Documents (vlax-get-acad-object))
    (if(not (equal doc active-doc))
    (vla-close doc :vlax-false)
    ; (vla-close doc :vlax-true)
    )
    )
    (princ)
    )

    What I'm not able to do is close the current DWG.

    Thanks.
    domenico
     
    domenico, Mar 31, 2005
    #7
  8. domenico

    domenico Guest

    I wish a VLisp Code . . .
     
    domenico, Mar 31, 2005
    #8
  9. domenico

    domenico Guest

    .. . . interesting . . . but I wish only VLisp code . . .

    domenico
     
    domenico, Mar 31, 2005
    #9
  10. As Jeff Pointed out, it's not PC to post content from
    that site here, but you're free to post a link to it.

    PS: caddzone.com is moving to a new server, so
    the address http://mysite.verizon.net/~vze2vjds
    will no longer work (going there will redirect you to
    the new server however).
     
    Tony Tanzillo, Mar 31, 2005
    #10
  11. domenico

    Shane-W Guest

    oopsie :p
     
    Shane-W, Mar 31, 2005
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.