This will close all currently open drawings, saving those that have been modified since their last save.
(vlax-for doc (vla-get-documents(vlax-get-acad-object))
(if (= doc (vla-get-activedocument(vlax-get-acad-object)))
nil
(progn
(if (or
(= 0 (getvar "dbmod"))
(= :vlax-false (vla-get-readonly doc))
)
(vl-catch-all-apply 'vla-close (list doc :vlax-false))
(vl-catch-all-apply 'vla-close (list doc :vlax-true))
)
)
)
)
I hate doing things I can make my computer do for me. My adventures in customizing and automating computers. Primarily with AutoCAD and Microsoft Office.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment