;;; ;;; ;;; Author: ;;; Henry C. Francis ;;; 425 N. Ashe St. ;;; Southern Pines, NC 28387 ;;; ;;; http://paracadd.com ;;; All rights reserved. ;;; (DEFUN save_file_chk () (SETQ princprfx (IF princprfx (STRCAT princprfx " ") "[DEBUG] " ) ;_ end of IF ) ;_ end of SETQ (IF princdebugstrs nil (LOAD "princdebugstrs" "\nFile PRINCDEBUGSTRS.LSP not loaded! ") ) ;_ end of IF (princdebugstrs (LIST "Begin execution of SAVE_FILE_CHK function.\n")) (IF (OR DOS_HELP check_for_doslib) NIL (LOAD "check_for_doslib" "\nFile CHECK_FOR_DOSLIB.LSP not loaded! ")) (IF DOS_HELP NIL (check_for_doslib)) (IF (OR mydbunmod (AND (NOT (EQ (BOOLE 1 1 (GETVAR "dbmod")) 1)) (NOT (EQ (BOOLE 1 4 (GETVAR "dbmod")) 4)) (NOT (EQ (BOOLE 1 8 (GETVAR "dbmod")) 8)) (NOT (EQ (BOOLE 1 16 (GETVAR "dbmod")) 16)) ) ;_ end of AND (EQ 0 (GETVAR "DWGTITLED")) ) ;_ end of OR (SETQ save_this nil what_to_do 3 ) ;_ end of SETQ (PROGN (SETQ what_to_do ; Question "Save changes to...?" Returns: 6=Yes, 3=No, or 1=Cancel (IF DOS_MSGBOX (DOS_MSGBOX (STRCAT "Save changes to " (GETVAR "dwgprefix") (GETVAR "dwgname") ) ;_ end of strcat "AutoCAD" 5 1 ) ;_ end of dos_msgbox (PROGN (IF ukword nil (LOAD "ukword" "\nFile UKWORD.LSP not loaded! ") ) ;_ end of IF (SETQ what_to_do_q (ukword 1 "Yes No Cancel" (STRCAT "Save Changes to " (GETVAR "dwgname") "? [Yes/No/Cancel]") "Yes" ) ;_ end of ukword ) ;_ end of SETQ (COND ((EQ (STRCASE what_to_do_q) "YES") (SETQ what_to_do 6)) ((EQ (STRCASE what_to_do_q) "NO") (SETQ what_to_do 3)) (T (SETQ what_to_do 1)) ) ;_ end of COND ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of SETQ (COND ((EQ what_to_do 6) ; "Save changes...?" Yes (or "Discard changes...?" No) (SETQ save_this T) (IF (EQ 0 (GETVAR "DWGTITLED")) (COMMAND ".saveas" "" "~") (IF c:qsave (c:qsave) (COMMAND ".qsave") ) ;_ end of IF ) ;_ end of IF (IF (EQ (GETVAR "DBMOD") 0) (SETQ ;what_to_do nil save_this nil ) ;_ end of SETQ ) ;_ end of IF ) ((EQ what_to_do 3) ; "Save changes...?" No (or "Discard changes...?" Yes) ;;; (SETQ what_to_do nil) (SETQ save_this nil) ) ) ;_ end of COND (IF debug_what_to_do nil (LOAD "MYOPEN_FUN" "\nFile MYOPEN_FUN.LSP not loaded! ") ) ;_ end of IF (debug_what_to_do (STRCAT "Set what_to_do(9) to " (IF (EQ (TYPE what_to_do) 'int) (ITOA what_to_do) (IF (EQ (TYPE what_to_do) 'str) what_to_do "?" ) ;_ end of IF ) ;_ end of IF ) ;_ end of STRCAT ) ;_ end of debug_what_to_do ) ;_ end of PROGN ) ;_ end of IF (princdebugstrs (LIST "End execution of SAVE_FILE_CHK function.\n")) (SETQ princprfx (COND ((AND princprfx (WCMATCH princprfx "`[DEBUG`] *")) (SUBSTR princprfx 1 (- (STRLEN princprfx) 2)) ) (T "[DEBUG] ") ) ;_ end of COND ) ;_ end of SETQ (PRINC) ) ;_ end of DEFUN ;|«Visual LISP© Format Options» (100 2 40 2 T "end of " 100 9 2 1 0 nil T nil T) ;*** DO NOT add text below the comment! ***|;