<?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: Grabbing File Name &amp;amp; Path of Components from Assembly using iLogic in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675467#M189919</link>
    <description>&lt;P&gt;Just ran the code. Is there a way to give a count those occurrences in that If statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to get a count of the number in that assembly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2019 19:40:26 GMT</pubDate>
    <dc:creator>felix.cortes5K3Y2</dc:creator>
    <dc:date>2019-03-21T19:40:26Z</dc:date>
    <item>
      <title>Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675362#M189916</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attempting to write a piece of code that will search the assembly for any part number beginning with "19-0189-W" inside each assembly, however, I am running into issues. So far, here's what I got in my code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
&lt;SPAN&gt;doc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;


&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oComp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
&lt;SPAN&gt;oComps&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FileNameandPath&lt;/SPAN&gt;


&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oComp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oComps&lt;/SPAN&gt;
	'FileNameandPath = oComp.????????

&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the FileNameandPath line, I do not know how to follow it up to get the path and file name. I've tried oComp.Definition.PathAndFileName but that does not work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once I have the FileNameandPath, I would like to do an IF statement to see that if the file name begins with "19-0189-W" then to store that file name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 19:00:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675362#M189916</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-21T19:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675394#M189917</link>
      <description>&lt;P&gt;Something to get you started..&lt;/P&gt;
&lt;PRE&gt;' set a reference to the assembly component definintion.
' This assumes an assembly document is open.
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

'Iterate through all of the occurrences
Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAsmCompDef.Occurrences
    Dim oName As String
    oName = oOccurrence.Name
    MessageBox.Show(oOccurrence.Name, "Component Name")
Next&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Mar 2019 19:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675394#M189917</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-03-21T19:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675437#M189918</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;openDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;searchTerm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Search text in Part Number"&lt;/SPAN&gt;, &lt;SPAN&gt;"Find text"&lt;/SPAN&gt;, &lt;SPAN&gt;"Default Entry"&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
	
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Design Tracking Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
   
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;InStr&lt;/SPAN&gt;(1, &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt;, &lt;SPAN&gt;searchTerm&lt;/SPAN&gt;) &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;displayname&lt;/SPAN&gt;, &lt;SPAN&gt;"FileName"&lt;/SPAN&gt;)
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;fullfilename&lt;/SPAN&gt;, &lt;SPAN&gt;"FullFileName"&lt;/SPAN&gt;)

	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Hi, this code searches for a text in each of the reference files of the assembly file or drawing file, if it exists it will return the file name. I hope it helps to solve your problem. regards&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 19:29:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675437#M189918</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-03-21T19:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675467#M189919</link>
      <description>&lt;P&gt;Just ran the code. Is there a way to give a count those occurrences in that If statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to get a count of the number in that assembly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 19:40:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675467#M189919</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-21T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675536#M189920</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7060191"&gt;@felix.cortes5K3Y2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Just ran the code. Is there a way to give a count those occurrences in that If statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to get a count of the number in that assembly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;Dim openDoc As Document
openDoc = ThisDoc.Document
Dim doc As Document

myCount = 0 'create a counter
Dim searchTerm As String = InputBox("Search text in Part Number", "Find text", "Default Entry")

For Each doc In openDoc.AllReferencedDocuments
	
    Dim oPartNumber As String = doc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value
   
    If InStr(1, oPartNumber, searchTerm) &amp;gt; 0 Then
	myCount = myCount+1 'if found increment counter by 1
	MessageBox.Show(doc.DisplayName, "FileName")
	MessageBox.Show(doc.FullFileName, "FullFileName")
	MessageBox.Show(myCount, "Count")

	End If
Next&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Mar 2019 20:07:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675536#M189920</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-03-21T20:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675612#M189921</link>
      <description>&lt;P&gt;What if I wanted to count the number of occurrences for each part number?&amp;nbsp; For example, I have the following parts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;11002-W-001&lt;/P&gt;
&lt;P&gt;11002-W-002&lt;/P&gt;
&lt;P&gt;11002-W-003&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I hit search 11002-W with the tool you provided, I get all of these to successfully show up in my Inventor interface.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have multiples of 11002-W-002 inside my assembly. How could I count the number of 11002-W-002 inside my assembly? I imagine this could be done inside the IF statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a ton Sergio,&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 20:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8675612#M189921</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-21T20:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8676004#M189922</link>
      <description>&lt;P&gt;The rule that we were accommodating with &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/74757"&gt;@mcgyvr&lt;/a&gt;&amp;nbsp; searches all file references can be these parts within subassemblies, subassemblies&lt;BR /&gt;I ask, do you want to get the number of individual parts of the bill of materials? if you need this we have to make another approach through the assembly BOM&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 00:04:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8676004#M189922</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-03-22T00:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8676968#M189923</link>
      <description>&lt;P&gt;Whoops! I thought it was you in the last message, didn't realize it was&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/74757" target="_blank"&gt;@mcgyvr&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp;No disrespect intended!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We'll, I'd like to get a list of all the used Sub Assemblies that are being shared across each assembly. I don't think a BOM does a great job in that and it's a bit slow to load. So far, I think this method is extremely much quicker and would complete the purpose if I knew how to write a piece of string that could count all the occurrences of a specific 11002-W-002 inside the assembly, which is distributed in different assemblies.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you both to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/74757"&gt;@mcgyvr&lt;/a&gt;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4253164"&gt;@Sergio.D.Suárez&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 13:11:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8676968#M189923</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-22T13:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677326#M189924</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7060191"&gt;@felix.cortes5K3Y2&lt;/a&gt;&amp;nbsp; How about this..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oAsmDef As AssemblyDocument
doc = ThisDoc.Document


myCount = 0 'create a counter
Dim searchTerm As String = InputBox("Search text in Part Number", "Find text", "Default Entry")

Dim oComp As ComponentOccurrence
oComps = doc.ComponentDefinition.Occurrences


For Each oComp In oComps
	oName = oComp.Name
	If oName.Contains(searchTerm)
	myCount = myCount+1 'if found increment counter by 1
	MessageBox.Show(oName, "Component Name")
	End If
Next

If myCount = 0
	MessageBox.Show("None Found", "None Found Message")
	Else
		MessageBox.Show(myCount &amp;amp; " of " &amp;amp; searchTerm &amp;amp; " found", "Found This Many")
End If&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Mar 2019 15:43:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677326#M189924</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-03-22T15:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677340#M189925</link>
      <description>&lt;P&gt;With the new code, every time I do a search of 11002-W, it gives me none found where as before it would successfully display the component file&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 15:50:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677340#M189925</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-22T15:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677493#M189926</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7060191"&gt;@felix.cortes5K3Y2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;With the new code, every time I do a search of 11002-W, it gives me none found where as before it would successfully display the component file&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I made assumptions I shouldn't have..&lt;/P&gt;
&lt;P&gt;Update coming soon to check for filename not component name..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 16:59:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677493#M189926</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-03-22T16:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677517#M189927</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7060191"&gt;@felix.cortes5K3Y2&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about this one?&lt;/P&gt;
&lt;PRE&gt;Dim oAsmDef As AssemblyDocument
doc = ThisDoc.Document


myCount = 0 'create a counter
Dim searchTerm As String = InputBox("Search text in Part Number", "Find text", "Default Entry")

Dim oComp As ComponentOccurrence
oComps = doc.ComponentDefinition.Occurrences


For Each oComp In oComps
	oName = oComp.ReferencedDocumentDescriptor.FullDocumentName
	If oName.Contains(searchTerm)
	myCount = myCount+1 'if found increment counter by 1
	MessageBox.Show(oName, "Component Name")
	End If
Next

If myCount = 0
	MessageBox.Show("None Found", "None Found Message")
	Else
		MessageBox.Show(myCount &amp;amp; " of " &amp;amp; searchTerm &amp;amp; " found", "Found This Many")
End If&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:11:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677517#M189927</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-03-22T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677665#M189928</link>
      <description>&lt;P&gt;Hmm still not working. I noticed that the first code would tell me each occurrence inside each sub assembly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This second code only searches on the top level assemblies and not inside each assembly&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I was hoping to do a count for each individual assembly. When I do a search of 11002-W, it returns all the assemblies with a prefix of 11002-W and I would need a count of each individual assembly found in that search.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a ton,&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 18:18:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677665#M189928</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-22T18:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677718#M189929</link>
      <description>&lt;P&gt;I wrote this piece of code because I think it'll give the result I want, however, I have a problem with the strings in the line highlighted in red. I'd like to check the quantity of each filename produced by then searching that exact file name in the assembly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;openDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;QTY&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;searchTerm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Search text in Part Number"&lt;/SPAN&gt;, &lt;SPAN&gt;"Find text"&lt;/SPAN&gt;, &lt;SPAN&gt;"Enter Prefix Entry"&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
	
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Design Tracking Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
   
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;InStr&lt;/SPAN&gt;(1, &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt;, &lt;SPAN&gt;searchTerm&lt;/SPAN&gt;) &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;displayname&lt;/SPAN&gt;
&lt;SPAN&gt;'	Messagebox.Show(FileName) ' SUCCESS&lt;/SPAN&gt;
		&lt;FONT color="#FF0000"&gt;For Each FileName In openDoc.AllReferencedDocuments&lt;/FONT&gt; &lt;SPAN&gt;' THIS LINE DOES NOT WORK&lt;/SPAN&gt;
			&lt;SPAN&gt;QTY&lt;/SPAN&gt; = &lt;SPAN&gt;QTY&lt;/SPAN&gt; + 1
			&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;QTY&lt;/SPAN&gt;, &lt;SPAN&gt;FileName&lt;/SPAN&gt;)
			&lt;SPAN&gt;Next&lt;/SPAN&gt;
	
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 18:43:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8677718#M189929</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-22T18:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8679099#M189930</link>
      <description>&lt;P&gt;Hi, I do not take it as a colleague offense, on the contrary, it's an honor for me to collaborate with &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/74757"&gt;@mcgyvr&lt;/a&gt;&amp;nbsp;, look at your level, I've learned a lot from your contributions, it's one of my teachers in this forum!&lt;BR /&gt;Returning to the problem in question here I send you another code, it is probably incomplete, but it may help you to add things. It is another approach, accessing the BOM and trying to capture the quantity of the row, if it is an assembly, it will look for the assembly in "model data" and if it is only part it will search in "only parts"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;main&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;openDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;myCount&lt;/SPAN&gt; = 0 &lt;SPAN&gt;'create a counter&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;searchTerm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Search text in Part Number"&lt;/SPAN&gt;, &lt;SPAN&gt;"Find text"&lt;/SPAN&gt;, &lt;SPAN&gt;"Default Entry"&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
	
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Design Tracking Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
   
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;InStr&lt;/SPAN&gt;(1, &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt;, &lt;SPAN&gt;searchTerm&lt;/SPAN&gt;) &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;myCount&lt;/SPAN&gt; = &lt;SPAN&gt;myCount&lt;/SPAN&gt;+1 &lt;SPAN&gt;'if found increment counter by 1&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;, &lt;SPAN&gt;"FileName"&lt;/SPAN&gt;)
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;, &lt;SPAN&gt;"FullFileName"&lt;/SPAN&gt;)
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;myCount&lt;/SPAN&gt;, &lt;SPAN&gt;"Count"&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;Search_Doc&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Search_Doc&lt;/SPAN&gt;(&lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oModelname&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&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;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBOM&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BOM&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOM&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;BOM&lt;/SPAN&gt;
		    &lt;SPAN&gt;' Set the structured view to 'all levels'&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOM&lt;/SPAN&gt;.&lt;SPAN&gt;StructuredViewFirstLevelOnly&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
		    &lt;SPAN&gt;' Make sure that the structured view is enabled.&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOM&lt;/SPAN&gt;.&lt;SPAN&gt;StructuredViewEnabled&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
		    &lt;SPAN&gt;' Make sure that the parts only view is enabled.&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOM&lt;/SPAN&gt;.&lt;SPAN&gt;PartsOnlyViewEnabled&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
	
	
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBOMView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BOMView&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOMView&lt;/SPAN&gt; = &lt;SPAN&gt;oBOM&lt;/SPAN&gt;.&lt;SPAN&gt;BOMViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)&lt;SPAN&gt;'BOM Model data&lt;/SPAN&gt;

		  &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;ListItems&lt;/SPAN&gt;(&lt;SPAN&gt;oBOMView&lt;/SPAN&gt;.&lt;SPAN&gt;BOMRows&lt;/SPAN&gt;, 0, &lt;SPAN&gt;oModelname&lt;/SPAN&gt;)
		  
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kPartDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBOMView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BOMView&lt;/SPAN&gt;
		&lt;SPAN&gt;oBOMView&lt;/SPAN&gt; = &lt;SPAN&gt;oBOM&lt;/SPAN&gt;.&lt;SPAN&gt;BOMViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3)&lt;SPAN&gt;'BOM only parts&lt;/SPAN&gt;

		  &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;ListItems&lt;/SPAN&gt;(&lt;SPAN&gt;oBOMView&lt;/SPAN&gt;.&lt;SPAN&gt;BOMRows&lt;/SPAN&gt;, 0, &lt;SPAN&gt;oModelname&lt;/SPAN&gt;)
		  
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;ListItems&lt;/SPAN&gt;(&lt;SPAN&gt;Rows&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BOMRowsEnumerator&lt;/SPAN&gt;, &lt;SPAN&gt;indent&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;,&lt;SPAN&gt;oModelname&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBOMRow&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BOMRow&lt;/SPAN&gt;


&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oBOMRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;Rows&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;rDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;rDoc&lt;/SPAN&gt; = &lt;SPAN&gt;oBOMRow&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinitions&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1).&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;rDocName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;rDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt; 
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;rDocName&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;oModelname&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oBOMRow&lt;/SPAN&gt;.&lt;SPAN&gt;ChildRows&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	        &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;ListItems&lt;/SPAN&gt;(&lt;SPAN&gt;oBOMRow&lt;/SPAN&gt;.&lt;SPAN&gt;ChildRows&lt;/SPAN&gt;, &lt;SPAN&gt;indent&lt;/SPAN&gt; + 1,&lt;SPAN&gt;oModelname&lt;/SPAN&gt;)
	    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Else&lt;/SPAN&gt;
	
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;rDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oType&lt;/SPAN&gt; = &lt;SPAN&gt;"Assembly_Quantity: "&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;rDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kPartDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oType&lt;/SPAN&gt;=&lt;SPAN&gt;"Part_Quantity: "&lt;/SPAN&gt;
		&lt;SPAN&gt;oQty&lt;/SPAN&gt; = &lt;SPAN&gt;oBOMRow&lt;/SPAN&gt;.&lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;
		&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;oType&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oQty&lt;/SPAN&gt;  ,&lt;SPAN&gt;"Total quantity"&lt;/SPAN&gt;)

	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I hope it helps to solve the problem&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 22:17:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8679099#M189930</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-03-23T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8680319#M189931</link>
      <description>&lt;P&gt;Hey thanks for getting back at me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the code on VBA but it gives me an error on the 3rd line saying: "Compile error, Invalid use of property". It points to the line that says openDoc = ThisDoc.Document&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really want to try your code out but it won't run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to add some lines to one of the first codes you provided and I think it should theoretically work but I cant find the syntax to do it. On the line highlighted on red, I get a quantity of the complete number of files inside the assembly and not the quantity of that file name inside the assembly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I need to do is find that syntax that would search each individual item in the browser instead of searching each file inside the assembly. This is what I written:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&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;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;innerdoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;qty&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;InnerFileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;SearchTerm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Search text in Part Number"&lt;/SPAN&gt;, &lt;SPAN&gt;"Find text"&lt;/SPAN&gt;, &lt;SPAN&gt;"Enter Prefix Entry"&lt;/SPAN&gt;)



&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
	&lt;SPAN&gt;qty&lt;/SPAN&gt; = 0
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;item&lt;/SPAN&gt;(&lt;SPAN&gt;"Design Tracking Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
	
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;InStr&lt;/SPAN&gt;(1, &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt;, &lt;SPAN&gt;SearchTerm&lt;/SPAN&gt;) &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;displayname&lt;/SPAN&gt;

&lt;SPAN&gt;'		Dim oPartDescription as String = doc.PropertySets.item("Design Tracking Properties").Item("Description").Value&lt;/SPAN&gt;
		
&lt;FONT color="#FF0000"&gt;		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;innerDoc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;openDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllDocuments 'RETURNS NUMBER OF PARTS INSIDE ASSEMBLY, NOT QUANTITY OF INDIVIDUAL FILE&lt;/SPAN&gt;&lt;/FONT&gt;
			&lt;SPAN&gt;InnerFileName&lt;/SPAN&gt; = &lt;SPAN&gt;innerDoc&lt;/SPAN&gt;.&lt;SPAN&gt;displayname&lt;/SPAN&gt;
			&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;InnerFileName&lt;/SPAN&gt;
				&lt;SPAN&gt;qty&lt;/SPAN&gt; = &lt;SPAN&gt;qty&lt;/SPAN&gt; + 1
				&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Test"&lt;/SPAN&gt;)
			&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
		&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;qty&lt;/SPAN&gt;, &lt;SPAN&gt;FileName&lt;/SPAN&gt;)
		&lt;SPAN&gt;'save to column&lt;/SPAN&gt;
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your help. I really want to try out the VBA code you've written.&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 04:22:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8680319#M189931</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-25T04:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8680588#M189932</link>
      <description>&lt;P&gt;what happens is that the code is for rule ilogic, make it run as an ilogic rule and if it is what you need we will see to modify it for VBA, greetings&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 08:03:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8680588#M189932</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-03-25T08:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Grabbing File Name &amp; Path of Components from Assembly using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8687475#M189933</link>
      <description>&lt;P&gt;Hey Sergio,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Okay I ran it and it works great. Really appreciate the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 15:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/grabbing-file-name-amp-path-of-components-from-assembly-using/m-p/8687475#M189933</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-03-27T15:29:51Z</dc:date>
    </item>
  </channel>
</rss>

