<?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: Error on Document.FullDocumentName in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410235#M97672</link>
    <description>&lt;P&gt;Never mind, changed it to oRefDoc.FullFileName and it seems to work fine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure why I was going through the ComponentDefinition in the first place&amp;nbsp;&lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2017 15:58:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-26T15:58:23Z</dc:date>
    <item>
      <title>Error on Document.FullDocumentName</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410206#M97670</link>
      <description>&lt;P&gt;When looping through all the referenced document of an assembly I occasionally get this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is&amp;nbsp;generated on the line of code:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;oPath&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Document&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FullDocumentName&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there another way to access the full file path of the document that's guaranteed to work&amp;nbsp;&lt;STRONG&gt;EVERY&lt;/STRONG&gt; time. Re-starting Inventor generally solves the issue, but then it will pop up again soon after.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code goes like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;' Get the active assembly. &lt;BR /&gt;Dim oAsmDoc As AssemblyDocument &lt;BR /&gt;oAsmDoc = ThisApplication.ActiveDocument&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;' Get all of the referenced documents. &lt;BR /&gt;Dim oRefDocs As DocumentsEnumerator &lt;BR /&gt;oRefDocs = oAsmDoc.AllReferencedDocuments&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;' Iterate through the list of documents. &lt;BR /&gt;Dim oRefDoc As Document&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;' Iterate through all referenced documents beneath the active assembly&lt;BR /&gt;For Each oRefDoc In oRefDocs&lt;BR /&gt;&lt;BR /&gt; ' Get filepath of document&lt;BR /&gt; 'Dim oPath As String&lt;BR /&gt; 'Try&lt;BR /&gt; ' Get filepath of document&lt;BR /&gt; oPath = oRefDoc.ComponentDefinition.Document.FullDocumentName&lt;BR /&gt; 'MsgBox("Success")&lt;BR /&gt; 'Catch&lt;BR /&gt; 'MsgBox("Fail")&lt;BR /&gt; 'End Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 15:51:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410206#M97670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-26T15:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Document.FullDocumentName</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410234#M97671</link>
      <description>&lt;PRE&gt;oRefDoc.FullFileName&lt;/PRE&gt;
&lt;P&gt;should work a little more reliably.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Document name appends the LOD.&lt;/P&gt;
&lt;P&gt;ie; C:\File.iam &amp;lt;MASTER&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FileName is just the base file name&lt;/P&gt;
&lt;P&gt;ie; C:\File.iam&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>Tue, 26 Sep 2017 15:58:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410234#M97671</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-09-26T15:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Document.FullDocumentName</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410235#M97672</link>
      <description>&lt;P&gt;Never mind, changed it to oRefDoc.FullFileName and it seems to work fine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure why I was going through the ComponentDefinition in the first place&amp;nbsp;&lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 15:58:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/error-on-document-fulldocumentname/m-p/7410235#M97672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-26T15:58:23Z</dc:date>
    </item>
  </channel>
</rss>

