<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I get the 'status' of an attached image vis .NET in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/3153752#M65319</link>
    <description>&lt;P&gt;Thanks for providing that work around Tony. Saved me a lot of time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2011 21:58:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-09-11T21:58:23Z</dc:date>
    <item>
      <title>How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687477#M65314</link>
      <description>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.&lt;BR /&gt;
&lt;BR /&gt;
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.  &lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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.</description>
      <pubDate>Mon, 24 May 2010 17:15:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687477#M65314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-24T17:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687478#M65315</link>
      <description>The problem you're having occurs because the runtime&lt;BR /&gt;
extension/object enabler that contains the RasterImage&lt;BR /&gt;
and RasterImageDef managed wrapper objects is not&lt;BR /&gt;
loaded when you try to access them.&lt;BR /&gt;
&lt;BR /&gt;
I reported this problem two releases back but they&lt;BR /&gt;
have yet to fix it.&lt;BR /&gt;
&lt;BR /&gt;
Implement IExtensionApplication in your project, and&lt;BR /&gt;
in your Initialize() method, add this:&lt;BR /&gt;
&lt;BR /&gt;
     new RasterImage().Dispose();&lt;BR /&gt;
&lt;BR /&gt;
You only need to do this once per AutoCAD session.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2011&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;SWEEKLY&gt; wrote in message news:6396331@discussion.autodesk.com...&lt;BR /&gt;
Hello all.  I am trying to clean up our drawing database and have run across &lt;BR /&gt;
several drawings that are showing external file references with a status of &lt;BR /&gt;
'unreferenced'.  During a scan early last week of all current revisions of our &lt;BR /&gt;
drawings (about 120000) we uncovered about 7500 drawings that don't quite cut &lt;BR /&gt;
the mustard as it pertains to the use of attachments.  I have written a small &lt;BR /&gt;
.NET app that scans through my drawings, but I am having difficulty with one &lt;BR /&gt;
aspect of my probing.&lt;BR /&gt;
&lt;BR /&gt;
I need to be able to open up an AutoCAD drawing, navigate to said drawings image &lt;BR /&gt;
dictionary, get a RasterImageDef from that dictionary, and then check to see &lt;BR /&gt;
what the 'status' of that drawing is.  By 'status' I mean the status as reported &lt;BR /&gt;
in the External References dialog that appears when using the command 'xref'. &lt;BR /&gt;
In particular, I want to write out/show a message when I encounter a drawing &lt;BR /&gt;
with an attachment that has a status of 'Unreferenced', which I take to mean &lt;BR /&gt;
that the drawing was attached at one point, has been unloaded, but not properly &lt;BR /&gt;
detached.&lt;BR /&gt;
&lt;BR /&gt;
My problem is that I can't seem to get to any property that shows that status. &lt;BR /&gt;
I have used ARXDBG to snoop the database and I can verify that I see the images &lt;BR /&gt;
still in the image dictionary, but not in the drawing itself.  I also can't seem &lt;BR /&gt;
to get at thte status of the attachment.  To compund the matter, everytime I try &lt;BR /&gt;
to inspect the RasterImageDef object I get, AutoCAD locks up and bombs out.&lt;BR /&gt;
&lt;BR /&gt;
Anyone have a means to do this?  I am guessing I could get at what I need via &lt;BR /&gt;
C++/ObjectARX but I don't want to go that route if I dont have to.  I have &lt;BR /&gt;
attached a snippet of the code I am currently using to scan through my drawings, &lt;BR /&gt;
not perfect or even pretty, but it works.&lt;/SWEEKLY&gt;</description>
      <pubDate>Mon, 24 May 2010 22:31:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687478#M65315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-24T22:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687479#M65316</link>
      <description>Done and done but still failing.  Still getting an autocad lockup followed by immediate death of app when I try to inspect the RasterImageDef.  I can't rule out some other issue in my code though.&lt;BR /&gt;
&lt;BR /&gt;
Is there a property that you know of that I can interrogate to get my ellusive status?  Or will I have to implement a LISP caller or drop into ARX?</description>
      <pubDate>Tue, 25 May 2010 17:40:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687479#M65316</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-25T17:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687480#M65317</link>
      <description>Oops.. Sorry, I forgot about this one, which I also ran into&lt;BR /&gt;
when I was working on the AutoCAD Database Explorer.&lt;BR /&gt;
&lt;BR /&gt;
There is a bug in the RasterImageDef API.&lt;BR /&gt;
&lt;BR /&gt;
The workaround is to open the RasterImageDef using&lt;BR /&gt;
OpenMode.ForWrite.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2011&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;SWEEKLY&gt; wrote in message news:6397066@discussion.autodesk.com...&lt;BR /&gt;
Done and done but still failing.  Still getting an autocad lockup followed by &lt;BR /&gt;
immediate death of app when I try to inspect the RasterImageDef.  I can't rule &lt;BR /&gt;
out some other issue in my code though.&lt;BR /&gt;
&lt;BR /&gt;
Is there a property that you know of that I can interrogate to get my ellusive &lt;BR /&gt;
status?  Or will I have to implement a LISP caller or drop into ARX?&lt;/SWEEKLY&gt;</description>
      <pubDate>Wed, 26 May 2010 04:42:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687480#M65317</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-26T04:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687481#M65318</link>
      <description>that got me past the autocad killing bug, thanks Tony.</description>
      <pubDate>Thu, 27 May 2010 18:47:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/2687481#M65318</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-27T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 'status' of an attached image vis .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/3153752#M65319</link>
      <description>&lt;P&gt;Thanks for providing that work around Tony. Saved me a lot of time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2011 21:58:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-the-status-of-an-attached-image-vis-net/m-p/3153752#M65319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-11T21:58:23Z</dc:date>
    </item>
  </channel>
</rss>

