Hey Guru's,
Damned if I could get this to work. Trying to unload xref's, preform code, and reload those unloaded xref's without loading the others previous unloaded. My previous code just unloaded/reloaded *. That's caused some problems with some of our drawings.
; Function to unload all xrefs
(defun unload
-all
-xrefs
() (if (eq :vlax-true (vla
-IsExternalReference xref
)) (if (= 1 (vla
-get
-IsResolved xref
)) )
)
)
)
)
; Function to reload previously loaded xrefs
(defun reload
-loaded
-xrefs
() (if (eq :vlax-true (vla
-IsExternalReference xref
)) )
)
)
)
(unload-all-xrefs) ; Unload all xrefs
;;;
;;; Main code without Xrefs labouring drawing.
;;
(reload-loaded-xrefs) ; Reload previously loaded xrefs
)
EDIT (John): Added code tags.