bitslapped Posted June 13, 2012 Posted June 13, 2012 Would it be possible to create a command that reloads xrefs in all open drawings? Preferably only xrefs that have changed, but all xrefs in all open drawings would also be great Thanks! Quote
Lee Mac Posted June 13, 2012 Posted June 13, 2012 As far as I know, the reload method of the VLA Block Object will only operate in the active document namespace, so you would only be able to reload XRefs in the current drawing: (defun c:rlall nil (vlax-for b (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (if (eq :vlax-true (vla-get-isxref b)) (vla-reload b)) ) (princ) ) (vl-load-com) (princ) Quote
BlackBox Posted June 13, 2012 Posted June 13, 2012 I have a similar utility for this that also allows for Implied selection. If no valid Implied selection exists, the code conditionally prompts the user to specify an XREF to reload by name. The prompt also includes an "All" option. This tool has been invaluable for my work. Quote
bitslapped Posted June 14, 2012 Author Posted June 14, 2012 As far as I know, the reload method of the VLA Block Object will only operate in the active document namespace, so you would only be able to reload XRefs in the current drawing: Thanks Lee. Would it be possible to cycle through open drawings, using this function on each one, and then jump back to the initial 'current' drawing? Quote
Lee Mac Posted June 14, 2012 Posted June 14, 2012 Thanks Lee. Would it be possible to cycle through open drawings, using this function on each one, and then jump back to the initial 'current' drawing? Not using LISP, since when another document namespace is made active, the LISP function will lose focus and will hence cease evaluation. The only way I see that this could be done is by writing a temporary Script to iterate over the drawings and evaluate the LISP function on each drawing, though, this is less than ideal. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.