Hello all. I am trying to clean up our drawing database and have run across several drawings that are showing external file references with a status of 'unreferenced'. During a scan early last week of all current revisions of our drawings (about 120000) we uncovered about 7500 drawings that don't quite cut the mustard as it pertains to the use of attachments. I have written a small .NET app that scans through my drawings, but I am having difficulty with one aspect of my probing.
I need to be able to open up an AutoCAD drawing, navigate to said drawings image dictionary, get a RasterImageDef from that dictionary, and then check to see what the 'status' of that drawing is. By 'status' I mean the status as reported in the External References dialog that appears when using the command 'xref'. In particular, I want to write out/show a message when I encounter a drawing with an attachment that has a status of 'Unreferenced', which I take to mean that the drawing was attached at one point, has been unloaded, but not properly detached.
My problem is that I can't seem to get to any property that shows that status. I have used ARXDBG to snoop the database and I can verify that I see the images still in the image dictionary, but not in the drawing itself. I also can't seem to get at thte status of the attachment. To compund the matter, everytime I try to inspect the RasterImageDef object I get, AutoCAD locks up and bombs out.
Anyone have a means to do this? I am guessing I could get at what I need via C++/ObjectARX but I don't want to go that route if I dont have to. I have attached a snippet of the code I am currently using to scan through my drawings, not perfect or even pretty, but it works.