In need of simple code to check the existence of any XREF's in current drawing and if any found LOCK the layer they are inserted on.
Thanks,
Instead of locking whatever layer they are inserted on, why wouldn't you want to put your xrefs on an appropriate layer and then lock it?
Such as G-ANNO-REFR (or what ever your desired standard is)?
Just a thought.
That way if someone put an xref on the wrong layer such as a text layer, you're not locking that one.