<?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: Can't find path of referenced file in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11707221#M148313</link>
    <description>&lt;P&gt;Yes! Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 12:18:21 GMT</pubDate>
    <dc:creator>Electrik</dc:creator>
    <dc:date>2023-01-26T12:18:21Z</dc:date>
    <item>
      <title>Can't find path of referenced file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11705746#M148289</link>
      <description>&lt;P&gt;I can't find the right text to get the File path of a referenced document within an IAM.&lt;/P&gt;&lt;P&gt;I have the code below. This gets me the full path (including filename) for each child of the parent IAM (from which the rule was run). I'm just using a message box as a simple diagnostic tool, to show what I'm getting.&lt;/P&gt;&lt;P&gt;Instead of "FullFileName", how do I get the Path WITHOUT the filename and extension?&lt;/P&gt;&lt;P&gt;Yes, ThisDoc.Path works when I'm within the "root level", but refDoc.Path is not working in this case.&lt;/P&gt;&lt;P&gt;I feel I'm missing something obvious.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;refDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
&lt;SPAN&gt;    MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;refDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;, &lt;SPAN&gt;"file path"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 20:37:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11705746#M148289</guid>
      <dc:creator>Electrik</dc:creator>
      <dc:date>2023-01-25T20:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find path of referenced file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11705900#M148292</link>
      <description>&lt;P&gt;you can try it like this:&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oDoc As Document = ThisDoc.Document

For Each refDoc As Document In oDoc.AllReferencedDocuments
	Dim path = System.IO.Path.GetDirectoryName(refDoc.FullFileName)
	MessageBox.Show(path, "file path")
Next&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Jan 2023 21:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11705900#M148292</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2023-01-25T21:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find path of referenced file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11707221#M148313</link>
      <description>&lt;P&gt;Yes! Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 12:18:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/can-t-find-path-of-referenced-file/m-p/11707221#M148313</guid>
      <dc:creator>Electrik</dc:creator>
      <dc:date>2023-01-26T12:18:21Z</dc:date>
    </item>
  </channel>
</rss>

