- 积分
- 7045
- 明经币
- 个
- 注册时间
- 2011-9-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2013-5-20 19:59:36
|
显示全部楼层
我也正写了个,献献丑
(vlax-put-property (vlax-get (vlax-get (vlax-get-acad-object) 'Preferences) 'OpenSave) 'AutoSaveInterval 30)
(if (not (equal (type dwg_reactor_Gohome) 'VLR-DWG-Reactor))
(setq dwg_reactor_Gohome (vlr-dwg-reactor nil '((:vlr-beginsave . GotoHome))))
)
(defun GotoHome (/ time)
(setq time (read (substr (rtos (getvar "cdate") 2 12) 10 4)))
(if (> time 1720)
(cond
((= 1 (getvar 'DWGTITLED))
(vl-mkdir (strcat (getvar 'DWGPREFIX) "图纸备份"))
(vl-file-copy (strcat (getvar 'DWGPREFIX) (getvar 'DWGNAME))
(strcat (getvar 'DWGPREFIX) "图纸备份\\" (cadr (fnsplitl (getvar 'DWGNAME))) (menucmd "m=$(edtime,$(getvar,DATE), YYYY-MO-DD HH-MM)")".dwg"))
(princ "\n-->备份完成")
)
((princ "\n-->没有保存"))
)
)(princ)
) |
|