本帖最后由 vitalgg 于 2024-11-22 09:52 编辑
- (defun c:save-and-close-all (/ docs)
- (setq docs nil)
- (vlax-for doc *DOCS*
- (if (/= "" (vla-get-fullname doc))
- (setq docs (cons (vla-get-fullname doc) docs))))
- (vlax-for doc *DOCS*
- (if
- (and
- (/= "" (vla-get-fullname doc))
- (/= (vla-get-fullname *DOC*) (vla-get-fullname doc)))
- (vla-close doc :vlax-true)))
- (if (and (/= "" (vla-get-fullname *DOC*)))
- (progn
- (vla-save *DOC*)
- (vla-sendcommand *DOC* "close ")))
- (princ))
源自 @lisp会话管理 :
https://gitee.com/atlisp/package ... sion/at-session.lsp
https://mp.weixin.qq.com/s?__biz ... 49394&lang=zh_CN#rd
|