Here is my code, but it's not working properly.
It's only reloading the xrefs in my active document.
How can i reload all my xref's from all the documents that i have opened?
(vlax-for @each (vla-get-Documents (vlax-get-acad-object))
(vlax-for @block (vla-get-Blocks @each)
(if (= :vlax-true (vla-get-IsXRef @block))
I'm not sure about this, but I suspect the reload method only applies to the active
document. Others here know more about this than I do.
And may I suggest, you shouldn't do (vla-get-Documents... within a vlax-for
statement. The Documents collection is static when the program runs.
(setq docs (vla-get-Documents (vlax-get-acad-object)))
... do stuff with docs ...
"MRL" <mail....@rosendal-038.tmfweb.nl> wrote in message
Has it something to do with vl-propagate ?
Joe Burke schreef:
Sorry, I don't know what the problem is. I tried the code you posted. The logic seems
sound, regardless of my comment. As you said, it errors when it tries to process open
files which are not the active file. And it appears to do what it should with the
I don't think vl-propagate is an issue since your code doesn't create symbols other
than temporary vlax-for items. vl-load-all might be an issue if each doc in the
documents collection must be made active for vla-Reload to work as expected. But
somehow that doesn't seem right to me.
We need some guru help here. I would like to know what the answer or problem is, as
much as you would.