TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: cmwade77 on December 14, 2010, 07:13:37 PM

Title: XREFs and Layers
Post by: cmwade77 on December 14, 2010, 07:13:37 PM
Ok, I have a bit of an urgent need here, first here is the situation:
We have a file on which all of our work is drawn and the file is xrefed into our sheets.
Currently all of the xrefs that are needed are attached into this drawing; however, for a variety of reasons these need be Overlays and all of the xrefs need to be overlaid into each sheet.

The only problem is that all of the layers turn back on once this is done and there are thousands of layers, even saving a layer state before changing everything to overlay and restoring it when it is done does not work.

I am wondering if anyone might have some LISP routines that might help with this?
Title: Re: XREFs and Layers
Post by: T.Willey on December 14, 2010, 07:37:25 PM
Just step though the layer collection, and make a list of the properties and the state they are in that you want.  Change the xrefs, then run a routine that will put back the layers.  Just make sure that no names change, or this won't work.
Title: Re: XREFs and Layers
Post by: cmwade77 on December 14, 2010, 07:56:43 PM
Yeah, we finally found where the problem was, thank you.
Title: Re: XREFs and Layers
Post by: danallen on December 14, 2010, 09:13:20 PM
Are you changing from attached to overlay by double clicking "attached" in the xref dialog box? In v2005 this was all it took and it had no effect on layers.
Title: Re: XREFs and Layers
Post by: cmwade77 on December 15, 2010, 11:06:46 AM
Yes, but it was because there were nested xrefs and there were some of them that were unloaded already.