<?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: Utilizing MakePath in SelectSet.Select in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835770#M177327</link>
    <description>&lt;P&gt;By the way, just to clarify - I'm aware that, in order to select multiple components, I will have to use SelectSet.SelectMultiple, but right now I'm just focused on using entities in deeper levels than the top level as the function argument.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2025 10:22:22 GMT</pubDate>
    <dc:creator>Anders_Olsen</dc:creator>
    <dc:date>2025-10-03T10:22:22Z</dc:date>
    <item>
      <title>Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835725#M177326</link>
      <description>&lt;P&gt;I'm trying to feed a list of part numbers from an input to the SelectSet.Select-function, but I can't get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have currently:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;.&lt;SPAN&gt;Select&lt;/SPAN&gt;(&lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;InventorComponent&lt;/SPAN&gt;(&lt;SPAN&gt;MakePath&lt;/SPAN&gt;(&lt;SPAN&gt;"75430:2"&lt;/SPAN&gt;, &lt;SPAN&gt;"75424:1"&lt;/SPAN&gt;)))&lt;/PRE&gt;&lt;P&gt;I've checked the MakePath-function in another context, so I know I'm using it correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried the SelectSet.Select-function with the input being on the first level:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;oDoc.SelectSet.Select(Component.InventorComponent("75430:2"))&lt;/LI-CODE&gt;&lt;P&gt;which also works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the combination of the two is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 09:33:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835725#M177326</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-03T09:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835770#M177327</link>
      <description>&lt;P&gt;By the way, just to clarify - I'm aware that, in order to select multiple components, I will have to use SelectSet.SelectMultiple, but right now I'm just focused on using entities in deeper levels than the top level as the function argument.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 10:22:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835770#M177327</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-03T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835837#M177329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8570749"&gt;@Anders_Olsen&lt;/a&gt;.&amp;nbsp; I could be wrong, because I rarely use that specific uniquely iLogic snippet, but I think you may need to enclose the two quoted component names within the { &amp;amp; } characters, to simulate them being two elements of an 'Array' ({"75430:2", "75424:1"}).&amp;nbsp; Of course, there are also alternative ways to get the lower level component occurrence, such as the example below which starts from a uniquely iLogic object, then transitions to Inventor API code for the rest.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;ThisAssembly.Document.ComponentDefinition.Occurrences("75430:2").Definition.Occurrences("75424:1")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=556e6699-fa38-1d5b-56ca-21dda81f1a8d" target="_blank" rel="noopener"&gt;ICadComponent.InventorComponent Property&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=37e7bcb6-55aa-01de-befc-e2beb63160a8" target="_blank" rel="noopener"&gt;LmiMath.MakePath Method&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 11:30:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835837#M177329</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-03T11:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835842#M177331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the fast response and suggestion.&lt;/P&gt;&lt;P&gt;I had the same idea and already tried the curly brackes, without luck.&lt;/P&gt;&lt;P&gt;I also tried your alternative suggestion (with a small tweak, adding "ItembyName" before the occurrence-argument):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;.&lt;SPAN&gt;Select&lt;/SPAN&gt;(&lt;SPAN&gt;ThisAssembly&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;ItembyName&lt;/SPAN&gt;(&lt;SPAN&gt;"75430:2"&lt;/SPAN&gt;).&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;ItembyName&lt;/SPAN&gt;(&lt;SPAN&gt;"75424:1"&lt;/SPAN&gt;))&lt;/PRE&gt;&lt;P&gt;Outside the SelectSet.Select-function, this also works - I can get the occurrence object and display it's name in a messagebox for instance - same story as with the MakePath-function. But inside the SelectSet.Select-function, it just does not work. The error just says that "The parameter is incorrect".&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 11:43:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835842#M177331</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-03T11:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835897#M177335</link>
      <description>&lt;P&gt;Ah, I see.&amp;nbsp; I see that sort of thing a lot.&amp;nbsp; Sometimes we just need to separate complex lines of code out a bit, and do a better job of defining their Types to get things to work.&amp;nbsp; And yes, I forgot that the 'ItemByName' property is not he 'default' one when trying to shorten the line of code to eliminate a couple steps.&amp;nbsp; I tend to do most things through Inventor API code, even though it usually requires more code, because it usually makes more logical sense to me or provides better/clearer control.&amp;nbsp; I too went through a long phase where I was attempting to make everything as condensed as possible, but I got over it, and opted for code that had better performance and was easier to read through and understand again at a later date.&amp;nbsp; My 'production' related codes and the stuff I post online are usually pretty different.&amp;nbsp; My production related codes usually contain lots of comments, error avoidance checks with some form(s) of feedback, are designed for best performance...and usually get tweaked lots of times as my knowledge and coding style changes.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 12:34:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835897#M177335</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-03T12:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835903#M177336</link>
      <description>&lt;P&gt;I agree, I also use the Inventor API as much as possible. I'm using the Component.InventorComponent and MakePath-function here, because I don't know what else to do. I'm open to alternative (more complex) solutions that fully use the Inventor API, if you have any. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 12:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835903#M177336</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-03T12:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835993#M177338</link>
      <description>&lt;P&gt;If you are iterating through a list (or dictionary, or similar) of String type values, and will be getting several different component occurrences during that process, I would suggest getting the ComponentOccurrences collection to a variable first (before the iteration starts), from the AssemblyComponentDefinition.Occurrences property.&amp;nbsp; Also get the SelectSet object to a variable before the iteration starts.&amp;nbsp; Those steps will eliminate a lot of little API calls later, making it more efficient.&amp;nbsp; Then&amp;nbsp;I would suggest declaring a ComponentOccurrence Type variable that you will later be setting the value of, so that it has a predefined Type, no matter how you set its value.&amp;nbsp; Then, after you have set the value of that variable in a later line of code, put the code for selecting it on the next line, where the input into that select method is that component variable.&amp;nbsp; Then whatever you are planning on doing with it in other lines of code after that point.&lt;/P&gt;
&lt;P&gt;But I simply do not know enough yet about the details of your overall design intent or plans to suggest much else yet, or provide a working code example.&amp;nbsp; If your list only contains the part number (or file name) of the lower level component, but not the name of its parent sub assembly, then a different strategy may be necessary.&amp;nbsp; Maybe get the referenced document with that part number (or file name) first, then use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=ComponentOccurrences_AllReferencedOccurrences" target="_blank" rel="noopener"&gt;ComponentOccurrences.AllReferencedOccurrences&lt;/A&gt;&amp;nbsp;method to get all of the occurrences throughout the entire assembly structure that reference it, then iterate through them, selecting each one and doing your thing with them.&amp;nbsp; That way you are not iterating through all occurrences in every level recursively looking for them, but just going directly to the ones you want to do something with.&amp;nbsp; Each occurrence object has the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=ComponentOccurrence_OccurrencePath" target="_blank" rel="noopener"&gt;OccurrencePath&lt;/A&gt;&amp;nbsp;property also, which returns an&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-ComponentOccurrencesEnumerator" target="_blank" rel="noopener"&gt;ComponentOccurrencesEnumerator&lt;/A&gt;&amp;nbsp;that we can convert to an array of Strings or ArrayList, if necessary, but that may be regressing.&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp; Here is a 'shot in the dark' example code, without knowing what your full plans are yet.&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;oADoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;TryCast&lt;/SPAN&gt;(&lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;, &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oADoc&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;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Debug&lt;/SPAN&gt;(&lt;SPAN&gt;"Rule named '"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;RuleName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"' did not run because no assembly obtained!"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSS&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt; = &lt;SPAN&gt;oADoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrences&lt;/SPAN&gt; = &lt;SPAN&gt;oADoc&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;oAllRefDocs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DocumentsEnumerator&lt;/SPAN&gt; = &lt;SPAN&gt;oADoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
		
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oListOfPNs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
	&lt;SPAN&gt;oListOfPNs&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"75430"&lt;/SPAN&gt;)
	&lt;SPAN&gt;oListOfPNs&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"75424"&lt;/SPAN&gt;)

	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;sPN&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oListOfPNs&lt;/SPAN&gt;
		&lt;SPAN&gt;'get the referenced Document with this Part Number (or FileName)&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRefDoc&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;In&lt;/SPAN&gt; &lt;SPAN&gt;oAllRefDocs&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;Value&lt;/SPAN&gt;
			&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;sPartNumber&lt;/SPAN&gt; = &lt;SPAN&gt;sPN&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
				&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRefOccs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrencesEnumerator&lt;/SPAN&gt; = &lt;SPAN&gt;oOccs&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedOccurrences&lt;/SPAN&gt;(&lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;)
				&lt;SPAN&gt;If&lt;/SPAN&gt; (&lt;SPAN&gt;oRefOccs&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt;) &lt;SPAN&gt;OrElse&lt;/SPAN&gt; (&lt;SPAN&gt;oRefOccs&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; = 0) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Continue&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
				&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRefOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oOccs&lt;/SPAN&gt;
					&lt;SPAN&gt;'If oRefOcc.Name.StartsWith(sPN) Then&lt;/SPAN&gt;
					&lt;SPAN&gt;oSS&lt;/SPAN&gt;.&lt;SPAN&gt;Select&lt;/SPAN&gt;(&lt;SPAN&gt;oRefOcc&lt;/SPAN&gt;)
					&lt;SPAN&gt;'&amp;lt;&amp;lt;&amp;lt; DO SOMETHING WITH IT &amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;
				&lt;SPAN&gt;Next&lt;/SPAN&gt; &lt;SPAN&gt;'oRefOcc&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;'oRefDoc&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt; &lt;SPAN&gt;'sPN&lt;/SPAN&gt;
	&lt;SPAN&gt;oADoc&lt;/SPAN&gt;.&lt;SPAN&gt;Update2&lt;/SPAN&gt;(&lt;SPAN&gt;True&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Oct 2025 13:54:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13835993#M177338</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-03T13:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13836456#M177356</link>
      <description>&lt;P&gt;Still no luck. Your sample still only selects components on the first level. I need the code to add selections across the entire hierarchy.&lt;/P&gt;&lt;P&gt;I should probably elaborate the purpose: My company has a lot of legacy Inventor data, which does not comply with current metadata standards. I've written an iLogic-rule (updateComponents), which automatically takes care of 90 % of the compliancy by just selecting the component, and running the rule. Moreover, I've written another rule (screenComponents), which analyzes an entire assembly, and fills out an excel sheet with all noncompliant properties of each component. Using the data from that sheet, I can generate a list of components (across the entire assembly hierarchy), which should be updated, using the aforementioned iLogic rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use that list of noncompliant components&amp;nbsp;as an input to a new function, which should automatically select &lt;EM&gt;only&lt;/EM&gt; the components that need to be updated. Once selected, the "updateComponents" iLogic-rule goes through the selectset one by one.&lt;/P&gt;&lt;P&gt;Alternatively, I would have to manually dig down to each noncompliant component, and manually multiselecting every single one of them, at which point I would be able to run the "updateComponents" iLogic-rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it makes sense. Here is my current full sample code - note that I'm simply adding each correctly flagged occurrence as if it's on the top level - I assume I need to apply the MakePath-function, when the occurrence is not in the first level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main
	oDoc = ThisDoc.Document
	
	Dim oComponentsString As String = InputBox("Input part numbers separated by comma", "Select components")
	
	oComponentsList = oComponentsString.Split(","c).ToList
	
	oObjCol = ThisApplication.TransientObjects.CreateObjectCollection
	assemblyRunner(oDoc)
	
	oDoc.SelectSet.SelectMultiple(oObjCol)
End Sub

Dim oDoc As AssemblyDocument
Dim oComponentsList As List(Of String)
Dim alreadyInList As Boolean
Dim occList As New List(Of ComponentOccurrence)
Dim oObjCol As ObjectCollection

Sub assemblyRunner(aDoc As AssemblyDocument)
	
	For Each oOcc In aDoc.ComponentDefinition.Occurrences
		Dim oOccDoc As Document = oOcc.Definition.Document
		Dim oPartNo As String = oOccDoc.PropertySets.Item(3).Item("Part Number").Value
		
		If oComponentsList.Contains(oPartNo) Then
			For Each comp In occList
				compPartNo = comp.Definition.Document.PropertySets.Item(3).Item("Part Number").Value
				If compPartNo = oPartNo Then
					alreadyOnList = True
					Exit For
				End If
			Next
			If alreadyOnList Then
				alreadyOnList = False
				Continue For
			Else
				occList.Add(oOcc)
				oObjCol.Add(oOcc)
			End If
		End If
		If oOccDoc.DocumentType = kAssemblyDocumentObject Then
			assemblyRunner(oOccDoc)
		End If
	Next
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 19:28:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13836456#M177356</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-03T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13839085#M177368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8570749"&gt;@Anders_Olsen&lt;/a&gt;.&amp;nbsp; I had no idea what you were planning on doing with each component just after selecting them, but attempting to get them into a collection to then run some other iLogic rule on later was not on my radar.&amp;nbsp; Using the SelectSet is usually not a good fit for something like that.&amp;nbsp; It has some restrictions and can be a bit finicky.&amp;nbsp; Using the other collection types (ObjectCollection, List(Of ), etc) should be OK though.&amp;nbsp; However, if you need a means to capture multiple objects that will stay in place between running one rule, to running another rule, then some additional strategy would be required.&amp;nbsp; There are ways for one iLogic rule to 'send' data to another iLogic rule, when it calls that other rule to run.&amp;nbsp; And a way to 'receive' data back from the other rule, after the other rule has finished running, if both rules are set-up to do so.&amp;nbsp; (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=c6f2c020-8318-5536-3e1f-c57a5125071b" target="_blank"&gt;RuleArguments&lt;/A&gt;)&amp;nbsp; There is also a way to store data from one rule up into an Inventor 'session' memory variable, where later rule(s) can later access that data from (the uniquely iLogic&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=9da80dee-a3ae-2f47-324b-4ef496b40e5b" target="_blank"&gt;SharedVariable&lt;/A&gt;).&amp;nbsp; One of the restrictions of the SelectSet is that it can only 'select' things that exist within the 'context' (definition &amp;amp; model coordinate space) of the Document they are associated with.&amp;nbsp; For example, the SelectSet from Document A can not select something that is within Document B.&amp;nbsp; And if Document A is not the 'active' document, you will not be able to use the DocumentA.SelectSet.Select() method on anything in it anyways, because true selection only works on the 'active' document.&amp;nbsp; I think that may be the problem in this case also, because some of the other components that may be referencing some of the referenced documents may be down within other sub assemblies, which means they would not be in the 'context' of the 'main/active' assembly directly.&amp;nbsp; With that in mind, the SelectSet object that the SelectSet.Select() method being used in that last example I posted could be switched out for something like the List(Of ComponentOccurrence) type collection instead, which may enable it to capture all the components you want.&amp;nbsp; However, I still don't know how your second rule will be using them, so still not sure if the context from where they are being gathered will be the best fit either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When iterating through assembly components (instead of just referenced documents), and wanting to do so 'recursively' (keeps stepping down into lower levels on its own), there are two ways to do that, which each work differently, as far as 'context' is concerned.&amp;nbsp; When stepping down through the 'definitions' of sub assemblies to access their sub components, that is one way, but the lower level components it accesses will not be in the 'context' of the main / active assembly.&amp;nbsp; When stepping down through the ComponentOccurrence.SubOccurrences collection, the association with the parent 'context' is maintained, so that the lower level components are still in the context of the main / active assembly.&amp;nbsp; This second way is sort of similar to navigating through the model browser tree's nodes, with the lower level nodes still being associated with the highest level node, due to the 'tree' structure.&amp;nbsp; This second way sounds like what you likely need in your situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within the example code that you posted above, I see a variable misspelling or difference in how it is spelled in multiple locations ("alreadyInList" vs "alreadyOnList").&amp;nbsp; It also looks like your variable named 'occList' may not be getting properly 'initialized'.&amp;nbsp; When declaring a variable for a reference type between methods, we can not initialize it or set an initial value to it until it is accessed within one of the methods.&amp;nbsp; It looks like you are using the 'New' keyword directly in the declaration line, then just adding values to it within the method, without first initializing the variable.&amp;nbsp; The 'New' keyword is used to initialize the List object, before entries can be added to it, but that step should be done within the method, and only when it is encountered or the first time, so avoid resetting its contents.&amp;nbsp; I also see that the 'assemblyRunner' method you are using, is also being used for 'recursion' down into lower levels of the assembly, but it is doing so through the 'definitions', which does not maintain contextual lineage with the 'active' assembly.&amp;nbsp; That is not necessarily a good or bad thing, depending on what you are trying to do with those components later.&amp;nbsp; If you are planning on making changes to those components later, then how you gathered them will determine the 'scope' (area of effect) of the changes.&amp;nbsp; If gathered through their definitions, then changes will effect the&amp;nbsp;independent referenced documents.&amp;nbsp; If gathered through SubOccurrences properties, then changes may only be relevant to those occurrences from the perspective of the active assembly, depending on the types of changes.&amp;nbsp; For example, if you wanted to change the colors of all components in an assembly, but do not want the color changes to actually effect the files that the components reference, but only want the colors to be in effect while viewing them from within the active assembly, then you would access them through the SubOccurrences property, instead of through their definitions.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 13:26:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13839085#M177368</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-06T13:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13839319#M177370</link>
      <description>&lt;P&gt;Here is another example of the rule that just 'finds and collects' the components with matching Part Number values, but does not do anything else with them except 'sharing them' for a later rule or process to use.&amp;nbsp; It is recursive, and broken up into 3 routines.&amp;nbsp; The first routine gets user input, then calls the second routine to run, while supplying it with this assembly's components collection, and instructions about how they should be dealt with.&amp;nbsp; Then the second routine is just for the recursion process, and should not need to be customized.&amp;nbsp; Then the third routine is what actually does a custom task with each occurrence.&amp;nbsp; In this case, that task is just getting the value of the Part Number iProperty from its referenced document, then seeing if that is one we are looking for.&amp;nbsp; If so, add it to the List.&amp;nbsp; Then, back in the 'Main' routine, after the recursion is done, it shares the List up into Inventor's session memory, so that a later rule can access it and do a custom task on its contents.&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;oADoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;TryCast&lt;/SPAN&gt;(&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oADoc&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;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Debug&lt;/SPAN&gt;(&lt;SPAN&gt;"The iLogic rule named '"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;RuleName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"' exited, because no AssemblyDocument was obtained."&lt;/SPAN&gt;)
		&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'gather input from the user&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sPartNumbersToFind&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;"Input part numbers separated by comma"&lt;/SPAN&gt;, &lt;SPAN&gt;"Select components"&lt;/SPAN&gt;)
	&lt;SPAN&gt;'if nothing entered, or is empty, exit the rule&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;.&lt;SPAN&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;(&lt;SPAN&gt;sPartNumbersToFind&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'attempt to put values into List&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;sPartNumbersToFind&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;","&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;oPartNumbersToFind&lt;/SPAN&gt; = &lt;SPAN&gt;sPartNumbersToFind&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;","c&lt;/SPAN&gt;).&lt;SPAN&gt;ToList&lt;/SPAN&gt;()
	&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; (&lt;SPAN&gt;oPartNumbersToFind&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;oPartNumbersToFind&lt;/SPAN&gt; = &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
		&lt;SPAN&gt;oPartNumbersToFind&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;sPartNumbersToFind&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;'get assembly occurrrences collection&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrences&lt;/SPAN&gt; = &lt;SPAN&gt;oADoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
	&lt;SPAN&gt;'call custom Sub routine to recurse this assemblies components&lt;/SPAN&gt;
	&lt;SPAN&gt;'True means maintain context with parent assemblies&lt;/SPAN&gt;
	&lt;SPAN&gt;RecurseComponents&lt;/SPAN&gt;(&lt;SPAN&gt;oOccs&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;, &lt;SPAN&gt;AddressOf&lt;/SPAN&gt; &lt;SPAN&gt;ProcessComponent&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;'share the resulting List(Of ComponentOccurrence) object to Inventor's session memory&lt;/SPAN&gt;
	&lt;SPAN&gt;SharedVariable&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"FoundComponentsList"&lt;/SPAN&gt;) = &lt;SPAN&gt;oPartNumbersToFind&lt;/SPAN&gt;
	&lt;SPAN&gt;'a later rule can retrieve this by: &lt;/SPAN&gt;
	&lt;SPAN&gt;'Dim FoundOccsList As List(Of ComponentOccurrence) = SharedVariable.Value("FoundComponentsList")&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'optionally update this assembly&lt;/SPAN&gt;
	&lt;SPAN&gt;'oADoc.Update2(True)&lt;/SPAN&gt;
	&lt;SPAN&gt;'optionally save this assembly&lt;/SPAN&gt;
	&lt;SPAN&gt;'If oADoc.Dirty Then oADoc.Save2(True)&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;'&amp;lt;&amp;lt;&amp;lt; declare 'global' variables here &amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumbersToFind&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oFoundOccs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;)

&lt;SPAN&gt;'just for assembly component recursion process (no need to customize)&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;RecurseComponents&lt;/SPAN&gt;(&lt;SPAN&gt;oComps&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrences&lt;/SPAN&gt;, _
	&lt;SPAN&gt;preserveContext&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Boolean&lt;/SPAN&gt;, _
	&lt;SPAN&gt;ComponentProcess&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Action&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;))
	&lt;SPAN&gt;'validate input collection&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; (&lt;SPAN&gt;oComps&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt;) &lt;SPAN&gt;OrElse&lt;/SPAN&gt; (&lt;SPAN&gt;oComps&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; = 0) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'start iterating input collection&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;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oComps&lt;/SPAN&gt;
		&lt;SPAN&gt;'call custom task to run on this instance&lt;/SPAN&gt;
		&lt;SPAN&gt;ComponentProcess&lt;/SPAN&gt;(&lt;SPAN&gt;oComp&lt;/SPAN&gt;)
		&lt;SPAN&gt;'if this occurrence is suppressed, we can not iterate through its sub occurrences&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Continue&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
		&lt;SPAN&gt;'if this occurrrence is not an assembly, we do not want to iterate its sub occurrences&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;DefinitionDocumentType&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;Continue&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
		&lt;SPAN&gt;'attempt to recurse down into its sub-components, if possible, and it has some&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;preserveContext&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;'&amp;lt;&amp;lt;&amp;lt; edits (can be) constrained to context of 'parent' assembly &amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;
			&lt;SPAN&gt;RecurseComponents&lt;/SPAN&gt;(&lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;SubOccurrences&lt;/SPAN&gt;, &lt;SPAN&gt;preserveContext&lt;/SPAN&gt;, &lt;SPAN&gt;ComponentProcess&lt;/SPAN&gt;)
		&lt;SPAN&gt;Else&lt;/SPAN&gt;
			&lt;SPAN&gt;'&amp;lt;&amp;lt;&amp;lt; edit each component's definition &amp;amp;/or referenced file independently &amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;
			&lt;SPAN&gt;RecurseComponents&lt;/SPAN&gt;(&lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;, &lt;SPAN&gt;preserveContext&lt;/SPAN&gt;, &lt;SPAN&gt;ComponentProcess&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;'oComp&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;'what to do to/with each occurrence&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;ProcessComponent&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;If&lt;/SPAN&gt; (&lt;SPAN&gt;oComp&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt;) &lt;SPAN&gt;OrElse&lt;/SPAN&gt; &lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'skip virtual components&lt;/SPAN&gt;
	&lt;SPAN&gt;'If (TypeOf oComp.Definition Is VirtualComponentDefinition) Then Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'skip welds within weldment type assemblies&lt;/SPAN&gt;
	&lt;SPAN&gt;'If (TypeOf oComp.Definition Is WeldsComponentDefinition) Then Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'get referenced Document&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCompDoc&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;Nothing&lt;/SPAN&gt;
	&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oCompDoc&lt;/SPAN&gt; = &lt;SPAN&gt;oComp&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt; : &lt;SPAN&gt;Catch&lt;/SPAN&gt; : &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oCompDoc&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;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'get Part Number iProperty value&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sPN&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oCompDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;Value&lt;/SPAN&gt;
	&lt;SPAN&gt;'if Part Number value is empty, then skip this component&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;.&lt;SPAN&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;(&lt;SPAN&gt;sPN&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'if this is 'NOT' one of the Part Number values we are looking for, then skip it&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumbersToFind&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;sPN&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;
	&lt;SPAN&gt;'initialize the List, if necessary&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; (&lt;SPAN&gt;oFoundOccs&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;oFoundOccs&lt;/SPAN&gt; = &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;)
	&lt;SPAN&gt;'meeds our requirements, so add it to our List&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oFoundOccs&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oComp&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oFoundOccs&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oComp&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;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 14:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13839319#M177370</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-06T14:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13840040#M177388</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Very thorough explanation, thank you.&amp;nbsp;&lt;BR /&gt;It is on purpose that I’m working with the definitions, and not just the components within the context of the assembly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;If the components on lower levels not being the active document should explain why they can’t be part of the selectSet, then by&amp;nbsp;that logic, the first first level components couldn’t be part of it either. And I can manually select any component I want - anywhere in the hierarchy - and subsequently retrieve the selections from the selectSet-method. So I’m still not convinced it can’t be done the other way around.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I appreciate your help, though.&amp;nbsp;Your suggestion could be a reasonable plan b, but I would prefer the selectSet.Select method, if at all possible.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 20:25:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13840040#M177388</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-06T20:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13840940#M177406</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can select occ proxy instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&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;AssemblyDocument&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;occ_proxy&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrenceProxy&lt;/SPAN&gt; = &lt;SPAN&gt;odoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;SubOccurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;odoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;.&lt;SPAN&gt;Select&lt;/SPAN&gt;(&lt;SPAN&gt;occ_proxy&lt;/SPAN&gt;)
&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Info&lt;/SPAN&gt;(&lt;SPAN&gt;odoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;(1).&lt;SPAN&gt;name&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 06:52:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13840940#M177406</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2025-10-07T06:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13841524#M177412</link>
      <description>&lt;P&gt;As Marcin pointed out, the term "&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-6A540540-CA8A-40AD-8EBF-C4BB1F3E7288" target="_blank" rel="noopener"&gt;proxy&lt;/A&gt;" has been left out of our earlier conversations, but is very appropriate to include here, because it helps explain the whole 'context' thing, and why the selection will only work under certain conditions.&amp;nbsp; They can be difficult to explain though.&amp;nbsp; A proxy is essentially some geometry that has been (copied, moved, and reoriented) from within the context of a child level component in an assembly, up into the context of its parent assembly.&amp;nbsp; The parent assembly can then select and interact with the proxy geometry, where it could not select or interact with the original geometry that existed in a different coordinate system.&amp;nbsp; The concept of the ComponentOccurrence object itself is very similar to the idea of proxies, because it is also essentially a copied and transformed version of the geometry from within some other external file, that has been placed into the context of an assembly.&amp;nbsp; Its geometry can be accessed by the assembly, as long as we are not stepping down into the definition of that component to access it.&amp;nbsp; Proxies are often created/retrieved for the purposes of enabling measurements, constraints, and similar functionalities between the geometry of that proxy, and something else that is already in the appropriate context.&amp;nbsp; Proxies are pretty much only necessary to work with and talk about when attempting to do things within assemblies by code, since Autodesk handles tons of these finer details for us automatically, behind the scenes, as we interact with things in the user interface.&amp;nbsp; Even the '&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=CommandManager_Pick" target="_blank"&gt;Pick&lt;/A&gt;' method, which pauses a code to allow manual user selection of a single object, seems to do some stuff for us to help eliminate the need for dealing with proxies, because it always seems to return an object that is in the active document's context, even if that means that it had to create a quick proxy of it.&amp;nbsp; The&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=AssemblyComponentDefinition_AdjustProxyContext" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition.AdjustProxyContext&lt;/A&gt;&amp;nbsp;method seems to be one of the tools to help enable such interactions, along with the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=ComponentOccurrence_CreateGeometryProxy" target="_blank" rel="noopener"&gt;ComponentOccurrence.CreateGeometryProxy&lt;/A&gt;&amp;nbsp;method.&amp;nbsp; When we step down to lower level components using the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=ComponentOccurrence_SubOccurrences" target="_blank" rel="noopener"&gt;ComponentOccurrence.SubOccurrences&lt;/A&gt;&amp;nbsp;route, we are then accessing the proxies of those lower level components, which are still accessible by the parent level assembly (the assembly that directly contains the ComponentOccurrence object that the method is being called from).&amp;nbsp; But when accessing lower level components through the&amp;nbsp;ComponentOccurrence.Definition.Occurrences route, we are reaching down into a different document's coordinate space, breaking the connection to the parent level.&lt;/P&gt;
&lt;P&gt;There are tons of official 'proxy' object Types, which are usually derived from the original object Type.&amp;nbsp; If you go into the online help area, under the 'Programming Interface', then under 'Inventor API Reference Manual', then under 'Objects', and do Ctrl+F search for the text "Proxy", you will find around 270 object Types which include that term at the end of their names.&amp;nbsp; That can be seen as an indicator of how important and widely used they are.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 12:02:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13841524#M177412</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-10-07T12:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Utilizing MakePath in SelectSet.Select</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13841753#M177415</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1734991"&gt;@marcin_otręba&lt;/a&gt;&amp;nbsp;thank you so much - it works! And&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;thanks, for the explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a utility now, which does exactly what I wanted. This is the code sample, if anyone's interested:&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;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;oComponentsString&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;"Insert part numbers, separated by comma"&lt;/SPAN&gt;, &lt;SPAN&gt;"Select components"&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;oComponentsList&lt;/SPAN&gt; = &lt;SPAN&gt;oComponentsString&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;","c&lt;/SPAN&gt;).&lt;SPAN&gt;ToList&lt;/SPAN&gt;
	
	&lt;SPAN&gt;oObjCol&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateObjectCollection&lt;/SPAN&gt;
	
	&lt;SPAN&gt;' On the first level, run through all occurrences, and add those found in the list to the object collection&lt;/SPAN&gt;
	&lt;SPAN&gt;firstLevelRunner&lt;/SPAN&gt;(&lt;SPAN&gt;oDoc&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;.&lt;SPAN&gt;SelectMultiple&lt;/SPAN&gt;(&lt;SPAN&gt;oObjCol&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&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;AssemblyDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oComponentsList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Boolean&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;aOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccProxy&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrenceProxy&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNo&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;oObjCol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ObjectCollection&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;firstLevelRunner&lt;/SPAN&gt;(&lt;SPAN&gt;aDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;aOccDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;
	
	&lt;SPAN&gt;' Loop through all first level occurrences, ignoring those already found using the "alreadyOnList"-variable&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;aOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;aDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
		&lt;SPAN&gt;aOccDoc&lt;/SPAN&gt; = &lt;SPAN&gt;aOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
		&lt;SPAN&gt;oPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;aOccDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&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;oComponentsList&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oPartNo&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;comp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oObjCol&lt;/SPAN&gt;
				&lt;SPAN&gt;compPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;comp&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&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;compPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;oPartNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
					&lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
					&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&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;If&lt;/SPAN&gt; &lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
				&lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
				&lt;SPAN&gt;Continue&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
			&lt;SPAN&gt;Else&lt;/SPAN&gt;
				&lt;SPAN&gt;oObjCol&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;aOcc&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;If&lt;/SPAN&gt;
		
		&lt;SPAN&gt;' If the current occurence is an assembly, loop through its lower levels using occurrence proxies&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;aOccDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;occRunner&lt;/SPAN&gt;(&lt;SPAN&gt;aOcc&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;occRunner&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;occProxyDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&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;occProxy&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrenceProxy&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;SubOccurrences&lt;/SPAN&gt;
		&lt;SPAN&gt;occProxyDoc&lt;/SPAN&gt; = &lt;SPAN&gt;occProxy&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
		&lt;SPAN&gt;oPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;occProxyDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&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;oComponentsList&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oPartNo&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;comp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oObjCol&lt;/SPAN&gt;
				&lt;SPAN&gt;compPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;comp&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&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;compPartNo&lt;/SPAN&gt; = &lt;SPAN&gt;oPartNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
					&lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
					&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&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;If&lt;/SPAN&gt; &lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
				&lt;SPAN&gt;alreadyOnList&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
				&lt;SPAN&gt;Continue&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
			&lt;SPAN&gt;Else&lt;/SPAN&gt;
				&lt;SPAN&gt;oObjCol&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;occProxy&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;If&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;occProxyDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;occRunner&lt;/SPAN&gt;(&lt;SPAN&gt;occProxy&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;</description>
      <pubDate>Tue, 07 Oct 2025 13:43:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/utilizing-makepath-in-selectset-select/m-p/13841753#M177415</guid>
      <dc:creator>Anders_Olsen</dc:creator>
      <dc:date>2025-10-07T13:43:07Z</dc:date>
    </item>
  </channel>
</rss>

