;;; ;;; ;;; ;;; ;;;Logs the quit. ;;; ;;;Prior to DEFUN below (COMMAND ".undefine" "quit") is required or this DEFUN will not ;;;redefuine QSAVE (COMMAND ".undefine" "quit") can be executed from here or anywhere ;;;else as long as it is called before this DEFUN ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-28-96 ;;;> EDITED: 06-25-2006 ;;; (IF (EQ (SUBSTR (GETVAR "acadver") 1 2) "14") (SETQ DEFUN-Q DEFUN) nil ) ;_ end of IF (DEFUN-Q c:quit (/ fstr) (IF (EQ (GETVAR "dbmod") 0) (SETQ what_to_do 0); Drawing is not modified (SETQ what_to_do ; Question "Save changes to...?" Returns: 6=Yes, 3=No, or 1=Cancel (DOS_MSGBOX (STRCAT "Save changes to " (GETVAR "dwgprefix") (GETVAR "dwgname") ) ;_ end of strcat "AutoCAD" 5 1 ) ;_ end of dos_msgbox ) ;_ end of SETQ ) ;_ end of IF (IF (EQ what_to_do 1) (PROGN (SETQ what_to_do nil) (PRINC "\n*CANCEL*") (PRINC) ) ;_ end of PROGN (PROGN (SETQ fstr " Quit..................: ") (IF dlog NIL (LOAD "dlog" "\nFile DLOG.LSP not loaded! ")) (dlog) (IF align_lst (PROGN (SETQ num (LOAD_DIALOG "gpdgn")) (gate_dlg) (UNLOAD_DIALOG num) (PRINC) ) ;_ end of progn (PRINC) ) ;_ end of if (IF (EQ (GETVAR "dbmod") 0) (COMMAND ".quit") (PROGN (COND ((EQ what_to_do 6); "Save changes...?" Yes (or "Discard changes...?" No) (SETQ what_to_do nil) (COMMAND ".quit" "n") ) ((EQ what_to_do 3); "Save changes...?" No (or "Discard changes...?" Yes) (SETQ what_to_do nil) (COMMAND ".quit" "y") ) ) ;_ end of COND ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of defun (PRINC)