CAD Designer Sam Lucido wrote a short and simple macro to instantly unload or reload all xrefs in an AutoCAD file.
"I often find myself working in a drawing with one or two very large external references attached. Sometimes I just want to unload (not detach) those files to focus on the area I am working in. These macros will do just that — run them and AutoCAD will load or unload all references within the file. This clears up the area and saves on regen time as well!
"For those of us who like tool palettes, place the following macro(s) in the command string on a palette.
- This macro will unload all references: ^C^C-XREF;U;*
- This macro will load all references: ^C^C-XREF;R;*
Notes from Cadalyst Tip Patrol: This is a simple piece of code, but it's one that can save you a lot of effort. If you turn xrefs on and off frequently — or would, if it were easier — then use this tip.