Based on your question in the beginning about the ability to do this as a side database, combined with the fact that you indicated a very large number of drawings needing searched, I worked up an example of how to do it, as a side database.
It would be much simpler if you opened the drawings into the editor, because you could use a selection filter to get all entities on layer 0, however, if you tried to do it that way on 5000 drawings it might take about a week. (depending somewhat on the drawing content)
Since you can't use the editor methods on a side database, you have to loop through both the ModelSpace and the PaperSpace opening every entity you find to check it's layer property.
I had a routine for copying block definitions from a side database to the current database, so I hacked up a copy of it (attached) to make a simple text report (In your MyDocuments Folder) of all entities found to be on layer 0 (with one exception, next paragraph). You pass it a string collection of filenames to process.
Tony, If you have any interest, you may note that my code here does not use the IsUsed property of the layer to short circuit the process. I did try to do that, thinking that at least that way if a drawing is clean, you don't have to loop the whole MS and PS to find out, but I found that it always returned true. (At first, I was not aware of the need for calling GenerateUsageData first, but even after it still always returned true) I believe through my limited efforts to test this routine, I determined that the root PaperSpace Viewport (the one that exists even of there are no mview created viewports) is reporting itself on layer 0, therefore IsUsed may work fine for other layers but could never be false for layer 0.
Of course this simple text report does you little good, but you would just insert whatever code you desire at the points where I am writing to the report, and there is one more detail which may need some work. I think if the drawing has multiple layouts there is more work to be done to catch all the paperspaces.
Anyone got any input on that? I used the SymbolUtilityServices.GetBlockPaperSpaceID(db) method to get the paperspace entities. Is that a 'Parent' PaperSpace to the multiple 'child' layout PaperSpaces, or will it represent the most recently activated Layout?
Dave O.