;;; Zoom Extents For All Layouts
;;; Modified by Igal Averbuh 2016 (added unloading and reloading of all xrefs and images bebore and after main process)

;;; LISP to unload all XREF's,and IMAGE's

(defun c:ua (/)
(vl-load-com)
(vl-cmdf "_.-xref" "u" "*")
(vl-cmdf "_.-image" "u" "*")
(princ)
)

;;; LISP to reload all XREF's,and IMAGE's

(defun c:ra (/)
(vl-load-com)
(setvar "visretain" 1)
(vl-cmdf "_.-xref" "r" "*")
(vl-cmdf "_.-image" "r" "*")
(princ)
)

;;; Zoom Extents For All Layouts (_gile program)
(defun c:ZEA (/ acad acdoc aclay)
(vl-load-com)
(setq acad (vlax-get-acad-object)
acdoc (vla-get-ActiveDocument acad)
aclay (vla-get-ActiveLayout acdoc)
)
(vlax-for layout (vla-get-Layouts acdoc)
(vla-put-ActiveLayout acdoc layout)
(command "_.PSPACE")
(vla-ZoomExtents acad)
)
(vla-put-ActiveLayout acdoc aclay)
(princ)
)
(c:ua)
(c:zea)
(c:ra)

Advertisements