is there a way to extract from the drawing database what layers including xref layers. that are on, off and frozen in model space, paper space and in the viewports, including the tabs. and than take this info. and use it as a script or such and apply it to the drawing after changes have been made. i know i can create a layer state but it will not work after xrefs have been reloaded. any ideas??