启动器:
- (vl-load-com)
- (command "_UNDEFINE" "_QSAVE")
- (defun c:QSave( / stringDate fileName )
- (setq stringDate (rtos (getvar "CDATE") 2 6))
- (if (eq (getvar "DWGTITLED") 0) ;test if drawing was saved
- (if (setq fileName (getfiled "Save drawing" (getvar "DWGPREFIX") "DWG" 1))
- (command "_.SAVE" (strcat (vl-filename-directory fileName) "\"
- (vl-filename-base fileName)
- "-Rev000-"
- (substr stringDate 1
- "-"
- (substr stringDate 10 4)
- (vl-filename-extension fileName)))
- )
- )
- (princ)
- )
- ;(command "_REDEFINE" "_QSAVE") ;to get ride later of this change
上述功能定义应放置在自动加载器中,以便在所有图纸中可用。 |