<?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 to programmatically find all references (xref dwg, jpg, pdf, OLE etc)? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497524#M66736</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please Go through the following link for the Solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://forums.autodesk.com/t5/NET/How-can-I-get-Direct-xref-of-a-Particular-Drawing-using-C-Code/m-p/3472456"&gt;http://forums.autodesk.com/t5/NET/How-can-I-get-Direct-xref-of-a-Particular-Drawing-using-C-Code/m-p/3472456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2012 04:43:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-13T04:43:52Z</dc:date>
    <item>
      <title>How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639219#M66730</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have some code (.Net addin application) that reads xrefs from a drawing. This code uses DataBase.GetHostDwgXrefGraph() and has worked fine until now.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
However, now I've run into some drawings that references not only .dwg-files, but also .jpg-files.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the XREF dialog in AutoCAD I can see that .jpg-files are referenced by the "parent" drawing, but GetHostDwgXrefGraph() doesn't seem to find the .jpg files.&lt;BR /&gt;
&lt;BR /&gt;
I have attached some sample code to illustrate what I do (FindExternalReferences.cs). In that file, I have a CommandMethod "xrl" finds all references of the mdi document and writes to debug output in visual studio.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also I added a zip-file containing a drawing "parent.dwg", and it referenes some other files that also are in the zip-file:&lt;BR /&gt;
* Another .dwg - child.dwg&lt;BR /&gt;
* sample-jpg.jpg&lt;BR /&gt;
* OLE link - sample-word.docx&lt;BR /&gt;
* PDF - sample-pdf.pdf&lt;BR /&gt;
* WMF - sample-wmf.wmf&lt;BR /&gt;
&lt;BR /&gt;
My top priority is to find referenced images (jpg, png, bmp), but I'd also be interested in how to find referenced OLE links, PDF and WMF.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Can I use GetHostDwgXrefGraph to accomplish this, or do I need to use some other method? Basically I'd like some code suggestion how I can find all referenced files from "parent.dwg" (not only the .dwg as my code works now).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
Mattias</description>
      <pubDate>Thu, 25 Feb 2010 06:59:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639219#M66730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-25T06:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE  etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639220#M66731</link>
      <description>Have a look at the Database's FileDependencyManager property.&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 2010&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;MATTIASH&gt; wrote in message news:6343866@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have some code (.Net addin application) that reads xrefs from a drawing. This &lt;BR /&gt;
code uses DataBase.GetHostDwgXrefGraph() and has worked fine until now.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
However, now I've run into some drawings that references not only .dwg-files, &lt;BR /&gt;
but also .jpg-files.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the XREF dialog in AutoCAD I can see that .jpg-files are referenced by the &lt;BR /&gt;
"parent" drawing, but GetHostDwgXrefGraph() doesn't seem to find the .jpg files.&lt;BR /&gt;
&lt;BR /&gt;
I have attached some sample code to illustrate what I do &lt;BR /&gt;
(FindExternalReferences.cs). In that file, I have a CommandMethod "xrl" finds &lt;BR /&gt;
all references of the mdi document and writes to debug output in visual studio.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also I added a zip-file containing a drawing "parent.dwg", and it referenes some &lt;BR /&gt;
other files that also are in the zip-file:&lt;BR /&gt;
* Another .dwg - child.dwg&lt;BR /&gt;
* sample-jpg.jpg&lt;BR /&gt;
* OLE link - sample-word.docx&lt;BR /&gt;
* PDF - sample-pdf.pdf&lt;BR /&gt;
* WMF - sample-wmf.wmf&lt;BR /&gt;
&lt;BR /&gt;
My top priority is to find referenced images (jpg, png, bmp), but I'd also be &lt;BR /&gt;
interested in how to find referenced OLE links, PDF and WMF.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Can I use GetHostDwgXrefGraph to accomplish this, or do I need to use some other &lt;BR /&gt;
method? Basically I'd like some code suggestion how I can find all referenced &lt;BR /&gt;
files from "parent.dwg" (not only the .dwg as my code works now).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
Mattias&lt;/MATTIASH&gt;</description>
      <pubDate>Thu, 25 Feb 2010 19:21:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639220#M66731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-25T19:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE  etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639221#M66732</link>
      <description>Hi Tony, thanks for replying.&lt;BR /&gt;
&lt;BR /&gt;
FileDependencyManager looks really interesting, however I found no documentation or samples on how to use it. By looking at FileDependencyManager in Visual Studio, it looks like it has methods for updating and erasing entries, but I found no way of enumerating all entries (???). Am I missing something obvious here? Do you have any suggestion on how to use the FileDependencyManager?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
Mattias</description>
      <pubDate>Mon, 01 Mar 2010 09:32:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639221#M66732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-01T09:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE  etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639222#M66733</link>
      <description>Mattias,&lt;BR /&gt;
&lt;BR /&gt;
Have you found some examples somewhere (or do yo have some) and can you share them with me (us), I have the same requirements...&lt;BR /&gt;
&lt;BR /&gt;
Thanx in advance</description>
      <pubDate>Wed, 05 May 2010 09:05:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/2639222#M66733</guid>
      <dc:creator>btmsoftware</dc:creator>
      <dc:date>2010-05-05T09:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3472532#M66734</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code is good and it works fine..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I want to find only Direct Children then what to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose I have a Drawing Structure like:&lt;BR /&gt;MasterRoot&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Root1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MasterChild1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MasterChild2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Root2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MasterChild1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MasterChild2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;&lt;BR /&gt;When I use XrefGraph xg = mainDb.GetHostDwgXrefGraph(true); in Code then I get all the Files as a node including MasterRoot (say count=6).&lt;BR /&gt;If I want to get Only direct Children (here, Root1 and Root2)(means count=2 only), then wha i have to do?&lt;BR /&gt;Is it Possible?&lt;BR /&gt;Any help will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance..&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Vasant Padhiyar&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2012 13:36:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3472532#M66734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-25T13:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3496138#M66735</link>
      <description>&lt;P&gt;we meet same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we can get the files attachment by Interop.TRANSMITTALLib.dll, but it's contain the pc3 and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who has the perfect solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3496138#M66735</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-12T13:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497524#M66736</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please Go through the following link for the Solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://forums.autodesk.com/t5/NET/How-can-I-get-Direct-xref-of-a-Particular-Drawing-using-C-Code/m-p/3472456"&gt;http://forums.autodesk.com/t5/NET/How-can-I-get-Direct-xref-of-a-Particular-Drawing-using-C-Code/m-p/3472456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2012 04:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497524#M66736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T04:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497526#M66737</link>
      <description>&lt;P&gt;Thanks, Vasant!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we can get all DWG reference file, but can't find the image(jpg/png/tiff)/PDF format file which attached my xref manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so&amp;nbsp;your link's &amp;nbsp;soluton can get the image file name/path?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2012 04:53:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497526#M66737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T04:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497556#M66738</link>
      <description>&lt;P&gt;Dear Vasant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tested the code in the new link(&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/06/finding-all-xrefs-in-the-current-database-using-cnet.html),"&gt;http://adndevblog.typepad.com/autocad/2012/06/finding-all-xrefs-in-the-current-database-using-cnet.html),&lt;/A&gt; it's can't find the image file's name/path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls see the attachment of sample drawings with dwg/JPG xref files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2012 05:45:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497556#M66738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T05:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497570#M66739</link>
      <description>It is my understanding that the xref graphing part of the API only applies to xrefs. To handle pdfs and raster images you need to work more directly with the named objects dictionary, specifically the PdfDefinition and RasterImageDef classes. It should be noted that you can also access xrefs from the block table, because xrefs are essentially brought in as blocks. However xref graphing provides additional support for nesting (which doesn't apply with pdfs or images). Here are some samples posted by norman yuan for pdfs: &lt;A target="_blank" href="http://forums.autodesk.com/t5/NET/Attach-PDF-or-RasterImage-Reload/m-p/3095024/"&gt;http://forums.autodesk.com/t5/NET/Attach-PDF-or-RasterImage-Reload/m-p/3095024/.&lt;/A&gt; And for raster images: &lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/05/how-to-insert-a-rasterimage-using-the-net-api.html"&gt;http://adndevblog.typepad.com/autocad/2012/05/how-to-insert-a-rasterimage-using-the-net-api.html&lt;/A&gt; I strongly recommend that you dig into the database structure to see what's going on under the hood. You can do this using the MgdDbg tool: &lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/04/dwg-debugger-mgddbg-app-for-autocad-20122013.html"&gt;http://adndevblog.typepad.com/autocad/2012/04/dwg-debugger-mgddbg-app-for-autocad-20122013.html&lt;/A&gt; Art</description>
      <pubDate>Wed, 13 Jun 2012 06:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497570#M66739</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T06:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497582#M66740</link>
      <description>&lt;P&gt;Artvegas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Your suggestion is very useful. we will check it with blocktable for testing, thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rick﻿&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2012 06:17:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497582#M66740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T06:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497588#M66741</link>
      <description>Based on your response i think i should clarify for you. For xrefs it is better to use the xref graph and nodes. But for pdfs and images you use the named object dictionary. Art.</description>
      <pubDate>Wed, 13 Jun 2012 06:27:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/3497588#M66741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T06:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/5641160#M66742</link>
      <description>&lt;P&gt;ARTVEGAS ... thx for participating with this thread, your input helped me get all references very quickly using "internal" managed c#&amp;nbsp;(NETLOAD DLL).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about COM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would we do the same process in an interop/com development (ouitside AutoCAD)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that maybe document.filedependencies would list the referenced files. On my test it did not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 07:07:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/5641160#M66742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-19T07:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically find all references (xref dwg, jpg, pdf, OLE etc)?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/6364904#M66743</link>
      <description>&lt;P&gt;Just to close the discussion here's how to do it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;CommandMethod("DetachImg")&amp;gt; _&lt;BR /&gt;Public Sub detach_img(mainDrawingFile As String)&lt;BR /&gt;Dim db As New Database(False, True)&lt;BR /&gt;db.ReadDwgFile(mainDrawingFile, System.IO.FileShare.ReadWrite, True, "")&lt;BR /&gt;Using db&lt;BR /&gt;Dim saveRequired As Boolean = False&lt;BR /&gt;Using tr As Transaction = db.TransactionManager.StartTransaction()&lt;BR /&gt;Dim imageDictId As ObjectId = RasterImageDef.GetImageDictionary(db)&lt;BR /&gt;If imageDictId.IsNull Then&lt;BR /&gt;Else&lt;BR /&gt;Dim imageDefinitions As New Dictionary(Of ObjectId, RasterImageDef)()&lt;BR /&gt;Dim imageDictionary As DBDictionary = tr.GetObject(RasterImageDef.GetImageDictionary(db), OpenMode.ForWrite)&lt;BR /&gt;For Each entry As DBDictionaryEntry In imageDictionary&lt;BR /&gt;Dim id As ObjectId = entry.Value, ObjectId&lt;BR /&gt;Dim rasterImageDef__1 As RasterImageDef = tr.GetObject(id, OpenMode.ForWrite)&lt;BR /&gt;If rasterImageDef__1.LocateActivePath = "" Then&lt;BR /&gt;rasterImageDef__1.Erase()&lt;BR /&gt;saveRequired = True&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;BR /&gt;End If&lt;BR /&gt;tr.Commit()&lt;BR /&gt;tr.Dispose()&lt;BR /&gt;End Using&lt;BR /&gt;If saveRequired Then&lt;BR /&gt;db.SaveAs(mainDrawingFile, DwgVersion.Current)&lt;BR /&gt;End If&lt;BR /&gt;End Using&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 17:01:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-programmatically-find-all-references-xref-dwg-jpg-pdf-ole/m-p/6364904#M66743</guid>
      <dc:creator>Littlerubarb</dc:creator>
      <dc:date>2016-06-03T17:01:56Z</dc:date>
    </item>
  </channel>
</rss>

