My two cents.
Why Lock the Document? You aren't doing anything with it.
using (document.LockDocument())
Good question. (This is for the code used for the "search only" code that doesn't change the databases.)
Jeff and all examples I could find said that if I used ReadDwgFile(false, true) I wouldn't need to lock the document.
But when I ran the code, i would get an "eNotFromThisDocument" error and subsequent fatal error with associated crash of Acad.
So I added the document lock back in.
After I read your post, I tried using ReadDwgFile(false, false) with no document lock and it ran fine. Why? dunno.
So I'm taking the lock out of the code.
Edit: I think I'll have to leave the doc lock in the code that changes the text strings , wouldn't I?
Edit#2: nope, not needed. Thanks!
Why ToString()? Elements of array are already strings?
string str = filelist[i].ToString();
Ah, good catch. This was copied from the other block of search code, where I was reading the listBox.Items, which needed that cast.
I get pulled in a lot of different directions around here so it can take me a while to go over the code and catch all that stuff.
Thanks!