Jump to content

Recommended Posts

Posted

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!

Posted

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)

Posted

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.

Posted
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?

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...