In AutoCAD, through the Layer Properties Manager UI, a user can refresh the usage information for layers in a drawing. The information sometimes get stale when you have layers from xrefs. In your code, when you access the LayerTable
for a drawing, its records will not include those layers that it deems as unused (in the Layer Properties Manager UI grey status = unused, blue status = used). In order for me to get to those layers, my program first needs to refresh the usage information. Is there a way to do this through the .NET API, COM API, or the command line?
I'm also pursing an answer in parallel in the AutoCAD forums
http://forums.autodesk.com/t5/NET/Programmatically-refresh-layer-usage-information-NET/m-p/2794756