Warning: I just woke up, this may not be as coherent as it should be.
A better way than lisp, I dunno VB?
Personally I'd do it in lisp, and it's mostly trivial. Rather than an automatic routine (read reactor based, which imo is always a last resort) this would be demand based (driven by user), though the drudgery bits would be taken care of for the user.
The only thing the user would have to do is --
(1) Run routine1: Take a snapshot of the current layer status of all xrefs (save status to a dictionary), and
(2) On demand, run routine2: Reload all xrefs, restore the xref layer status per the snap shot data and turn off any layers that don't exist in the snapshot data.
If one were really ambitious you could loosely follow the layer manager paradigm: mulitiple (named) snapshots or "return points". This of course would not be the trivial version.
Wow, do I ever need coffee this morning.