TheSwamp

CAD Forums => CAD General => Topic started by: notredave on August 21, 2019, 11:49:23 AM

Title: xref global changes
Post by: notredave on August 21, 2019, 11:49:23 AM
Good morning all,

For the life of me, I can't find the post that refers to my dilemma. I had read where you can xref a directory of drawings, make a change that is in every drawing and all drawings get updated without having to open every drawing. If someone can refresh my memory on how to accomplish this, I sure would appreciate it. I have to erase a block (same name in every drawing) in 94 drawings.

P.S. The drawings I am talking about are all in Model Space, no xrefs in any drawings.

Thank you in advance,
David
Title: Re: xref global changes
Post by: ronjonp on August 21, 2019, 01:17:00 PM
I think you're referring to find and replace text within XREFs .. you are still going to need to open the drawings or use Lee's ODBX wrapper.
Title: Re: xref global changes
Post by: notredave on August 21, 2019, 01:24:31 PM
hey ronjonp, thank you for jumping in. I wish I would have saved the page that I saw on how to xref all the drawings required, make a change that is typical in every drawing and somehow it does it. I just can't remember the steps to take. I forgot whether to open a new drawing, then xref or xref from one of the drawings that needs fixing. Also, the settings in "Attach External Reference" was included in that post. Oh well, one day I will go thru hundreds of posts to see if I can find it again. Thank you for replying.
Title: Re: xref global changes
Post by: ronjonp on August 21, 2019, 01:39:55 PM
This what you are thinking of? http://www.theswamp.org/index.php?topic=55170.msg594457#msg594457
Title: Re: xref global changes
Post by: notredave on August 21, 2019, 01:55:13 PM
That's the one!!! Thank you very much ronjonp! Also, congratulations on your 7000th post.
Title: Re: xref global changes
Post by: MP on August 21, 2019, 02:01:38 PM
Also, congratulations on your 7000th post.

+1
Title: Re: xref global changes
Post by: ronjonp on August 21, 2019, 02:04:26 PM
Hahaha .. thanks guys. *beers*
Title: Re: xref global changes
Post by: notredave on August 21, 2019, 02:16:42 PM
I thought I had it, but....it made changes and can't figure out how to save the xrefs back to individual drawings in directory. The new drawing with all drawings xrefed saves to directory with all drawings attached but individual drawings aren't updated. I thought I had it but when it comes to me making things work, I almost always fail the first time. Am I making any sense?
Title: Re: xref global changes
Post by: ronjonp on August 21, 2019, 03:37:44 PM
I thought I had it, but....it made changes and can't figure out how to save the xrefs back to individual drawings in directory. The new drawing with all drawings xrefed saves to directory with all drawings attached but individual drawings aren't updated. I thought I had it but when it comes to me making things work, I almost always fail the first time. Am I making any sense?
I'm confused as to what you are doing. Lee has already given you the answer to this problem. This task could be done in less than a minute with his code.

As an alternative, you could load my Delete Blocks (http://lee-mac.com/deleteblocks.html) program and call it in the following way from my Script Writer (http://lee-mac.com/scriptwriter.html):
Code: [Select]
_.open *file* (load "DeleteBlocksV1-1.lsp" nil) (LM:deleteblocks:acdoc '("squad")) _.qsave _.close
The LM:deleteblocks function could alternatively be used in conjunction with my ObjectDBX Wrapper (http://lee-mac.com/odbxbase.html) in the following way:
Code: [Select]
(defun c:delsquad ( )
    (LM:odbx '(lambda ( doc ) (LM:deleteblocks doc '("squad"))) nil t)
    (princ)
)
Title: Re: xref global changes
Post by: notredave on August 22, 2019, 10:36:33 AM
ronjonp, I have something different to do on a lot of drawings erasing a diamond with number in it, located in pretty much same location across drawings, it is not a block. I have no problem xrefing all the drawings in and erase crossing the 2 objects. I just don't know how to have all xrefs attached to save back to their folder I attach from and have changes saved to individual drawings. The post from Jeff H
http://www.theswamp.org/index.php?topic=55170.msg594457#msg594457 on his line item "Did a Replace and it updated text and saved drawings." is what is stumping me. If you or anyone else knows how to accomplish this, it will be greatly appreciated because I think this is a great way to edit multiple drawings at once.

Thank you,
David
Title: Re: xref global changes
Post by: ronjonp on August 22, 2019, 11:33:05 AM
That trick only works because the FIND command has the option to search xrefs and find and replace. It does not apply to what you're trying to achieve.
Title: Re: xref global changes
Post by: notredave on August 22, 2019, 11:55:02 AM
ronjonp, understood. What I need to know is how to save all those attached xrefs back to individual drawings in directory. I opened a "new" drawing and attached 3 drawings for testing purposes, did a find and replace. Now what do I do to get them back as individual drawings with changes made? I used XA command, highlighted the 3 drawings and used settings in pic.
Title: Re: xref global changes
Post by: ronjonp on August 22, 2019, 12:05:47 PM
AFAIK the changes are saved in the XREF files after you find and replace. Nothing else needs to be done.
Title: Re: xref global changes
Post by: Jeff H on August 22, 2019, 04:10:22 PM
When you choose "Replace" do you not get this dialog?
Title: Re: xref global changes
Post by: Jeff H on August 22, 2019, 04:20:36 PM
Quick video showing it works, but just occurred to me might have to to do with demand load settings??? If you have file open and locked it might not work.
Screencast (https://autode.sk/2Nr5dBw)
Title: Re: xref global changes
Post by: notredave on August 26, 2019, 09:59:05 AM
Thank you for all your replies. Here at work, when you create a directory, it is read only by default. The test drawings I had were in there and did not work. I tried it in active directory and it works! Thank you ronjonp and JeffH for the responses. I just love that trick!

Thank you,
David