Hmmm one of those odd things that bother me,
I try from the command line to reload all XREF's.
If one is found the command errors and discontinues instead of moving on through the list.
Command:
-XREF
Enter an option [?/Bind/Detach/Path/Unload/Reload/Overlay/Attach] <Attach>: R
Enter xref name(s) to reload: *
Reload Xref "Zbased9": ..\XREF\Zbased9.dwg
"Zbased9.dwg" cannot be found.
*Invalid*
Command:
I try the same thing here and get the same result.
I don't mind if it tells me a file is missing,
I just want it to continue repeating through the list until done.
so if blk is xref it reloads but where do I check if exist to prevent it from erroring?
Use findfile again?
(defun c:rax (/ blks)
(vl-load-com)
(setq blks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))))
(vlax-for blk blks
(if (equal (vla-get-isxref blk) :vlax-true)
(progn (vla-reload blk)
(princ (strcat "\n Reloading XREF : " (vla-get-name blk) ".....next"))
) ; end progn
) ; end if
)
(princ "\n XREF reloading complete!!!\n")
(princ)
)