<?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: iLogic: Expand &amp;quot;Origin&amp;quot; in the Model Tree in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11675099#M36939</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5303485"&gt;@tgregory3G7FA&lt;/a&gt;.&amp;nbsp; You can give this version a try.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;oDoc = ThisDoc.Document
oSS = oDoc.SelectSet : If oSS.Count = 0 Then Return
oMP = oDoc.BrowserPanes.Item("Model")
For Each oObj In oSS
	If TypeOf oObj Is ComponentOccurrence Then
		Dim oOcc As ComponentOccurrence = oObj
		oNodes = oMP.GetBrowserNodeFromObject(oOcc).BrowserNodes
		Try : oNodes.Item("Origin").Expanded = True: Catch : End Try
		Try : oNodes.Item("Folded Model").BrowserNodes.Item("Origin").Expanded = True: Catch : End Try
	End If
Next&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 12 Jan 2023 16:48:22 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2023-01-12T16:48:22Z</dc:date>
    <item>
      <title>iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179132#M36929</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't find a way to expand the "Origin" folder of the currently selected component. Could this be done with iLogic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 304px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1069141iB9A42AEDA8A647D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 07:41:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179132#M36929</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2022-05-19T07:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179656#M36930</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;.&amp;nbsp; Here is an iLogic rule you may be able to use for that task.&amp;nbsp; It worked OK in a couple of my own tests.&amp;nbsp; The selected component likely needs to be a 'top level' component though, because I'm using its 'Parent' to get the active assembly document and its browser pane to work with.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	Dim oComp As ComponentOccurrence = PickComponent
	If IsNothing(oComp) Then Exit Sub
	Dim oADoc As AssemblyDocument = oComp.Parent.Document 'or .FactoryDocument
	Dim oModelPane As BrowserPane = oADoc.BrowserPanes.Item("Model") 'AmBrowserArrangement
	Dim oCompNode As BrowserNode = oModelPane.GetBrowserNodeFromObject(oComp)
	For Each oNode As BrowserNode In oCompNode.BrowserNodes
		If oNode.BrowserNodeDefinition.Label = "Origin" Then
			If Not oNode.Expanded Then oNode.Expanded = True
		End If
	Next
End Sub

Function PickComponent(Optional oPrompt As String = vbNullString) As ComponentOccurrence
	If oPrompt = "" Then oPrompt = "Select a Component."
	oObj = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, oPrompt)
	If IsNothing(oObj) OrElse (TypeOf oObj Is ComponentOccurrence = False) Then Return Nothing
	Dim oOcc As ComponentOccurrence = oObj
	Return oOcc
End Function&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank"&gt;My IDEAS &lt;/A&gt; :bulb: or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:03:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179656#M36930</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-19T12:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179851#M36931</link>
      <description>&lt;P&gt;Thank you. Almost there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, the component may not be on the top-level,&amp;nbsp;&lt;SPAN&gt;so the code doesn't work yet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I am trying to do, is to replace the "Find in Browser" option (with an F shortcut to run it) with a function that will find the component in browser and automatically expand the "Origin" folder. This is the code I have to find in browser and expand the main component folder:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ThisApplication.CommandManager.ControlDefinitions.Item("AppFindInBrowserCtxCmd").Execute
ThisApplication.CommandManager.ControlDefinitions.Item("AppBrowserExpandFolderCmd").Execute&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After running this code, the component is already selected and expanded. Just need to expand the "Origin" folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do this because I create constraints to the planes a lot, and I want to skip the manual expanding folders process&amp;nbsp;to get to the planes.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 13:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11179851#M36931</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2022-05-19T13:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11180124#M36932</link>
      <description>&lt;P&gt;Just so you know then...that 'Origins' node, may look like a &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-7EEF0FA8-2FC7-4928-9E44-7AA9BBCDC619" target="_blank" rel="noopener"&gt;BrowserFolder&lt;/A&gt;, but apparently it is not recognized that way when trying to find it by code.&amp;nbsp; I know because I tried looking for it that way when I made the earlier code, but it found zero BrowserFolders under the node of the component (BrowserNode.BrowserFolders.Count = 0).&amp;nbsp; That's why I had to loop through the BrowserNode.BrowserNodes and find it by its 'Label' instead.&lt;/P&gt;
&lt;P&gt;Also, you may be able to keep climbing up the 'Parent' ladder from the component, using error management technique like Try...Catch block, until it doesn't return anything anymore in an attempt to find the top level assembly, if the component is not a top level component.&amp;nbsp; Just a thought.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 14:59:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11180124#M36932</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-19T14:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11180768#M36933</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're wanting to preselect the items then you could use something like this. I don't think the find in browser and expand folder command manager lines are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SelectSet&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;sSet&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;'exit rule&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&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;sSet&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Parent&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Model"&lt;/SPAN&gt;) _
.&lt;SPAN&gt;GetBrowserNodeFromObject&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 19:11:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11180768#M36933</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2022-05-19T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11181694#M36934</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked to expand the Origin &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the part is a "Sheet Metal", I need to expand the "Folded Model" first. The following code didn't work yet. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'On Error Resume Next

ThisApplication.CommandManager.ControlDefinitions.Item("AppFindInBrowserCtxCmd").Execute
ThisApplication.CommandManager.ControlDefinitions.Item("AppBrowserExpandFolderCmd").Execute

Dim sSet As SelectSet = ThisDoc.Document.SelectSet
If sSet.Count = 0 Then Return 'exit rule
Dim oOcc As ComponentOccurrence = sSet.Item(1)

'Code for Sheet Metal
'It expands "Folded Model" but not the "Origin"
oOcc.Parent.Document.BrowserPanes.Item("Model").GetBrowserNodeFromObject(oOcc).BrowserNodes.Item("Folded Model").Expanded = True
oOcc.Parent.Document.BrowserPanes.Item("Folded Model").GetBrowserNodeFromObject(oOcc).BrowserNodes.Item("Origin").Expanded = True

'Code for everything else
oOcc.Parent.Document.BrowserPanes.Item("Model").GetBrowserNodeFromObject(oOcc).BrowserNodes.Item("Origin").Expanded = True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: found this forum topic:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/expanding-the-origin-of-a-selected-component-in-browser/td-p/7450912" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/expanding-the-origin-of-a-selected-component-in-browser/td-p/7450912&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I customized the code and got it working like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument

Dim sSet As SelectSet = ThisDoc.Document.SelectSet
If sSet.Count = 0 Then Return

Dim oOcc As ComponentOccurrence = sSet.Item(1)

Dim oPane As BrowserPane = oDoc.BrowserPanes.Activepane
		
Dim oCompo As BrowserNode = oPane.GetBrowserNodeFromObject(oOcc)

Dim oNode As BrowserNode
For Each oNode In oCompo.BrowserNodes	
	If oNode.FullPath.Contains("Origin") Then
		oNode.Expanded = True
	Else If oNode.FullPath.Contains("Folded Model") Then
		Dim oNodeSheet As BrowserNodeDefinition
		oNodeSheet = oNode.BrowserNodeDefinition
		' Get the work plane browser node.
		Dim oWorkPlaneNode As BrowserNode
			oWorkPlaneNode = oCompo.AllReferencedNodes(oNodeSheet).Item(1)
		Dim oNode2 As BrowserNode
		For Each oNode2 In oWorkPlaneNode.BrowserNodes	
			If oNode2.FullPath.Contains("Origin") Then
				oNode2.Expanded = True
			End If
		Next
	End If
Next

ThisApplication.CommandManager.ControlDefinitions.Item("AppFindInBrowserCtxCmd").Execute&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 May 2022 07:47:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11181694#M36934</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2022-05-20T07:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11182374#M36935</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;.&amp;nbsp; In order to effectively use that 'find in browser' command, you need to have a single model entity selected (a single valid object within the Document.SelectSet), before executing that command.&amp;nbsp; So, just as &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt; stated, since we are doing that same action by API code, executing that command is not necessary anymore, so you can get rid of that command from the end of your code, because it is not accomplishing anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, here is just another example of an iLogic rule to expand the 'Origin' node, when the selected component may or may not be a sheet metal part.&amp;nbsp; I chose to create handy little custom Function just for finding a BrowserNode by its 'Label' under a given BrowserNode, even if it may be multiple levels under that node.&amp;nbsp; It will simply return the 'first' BrowserNode that it finds matching the specified label under the specified BrowserNode.&amp;nbsp; The main code first tries to find the node for the 'Folded Model'.&amp;nbsp; If found, it will then try to find the 'Origin' node under that.&amp;nbsp; If the 'Folded Model' node was not found, it then just tries to find the 'Origin' node under the main node.&amp;nbsp; Once it has the 'Origin' node, it sets it to expanded.&amp;nbsp; Once it does that, even if the component node was not expanded at all, this will immediately expand all 3 nodes (component node, folded model node, &amp;amp; origin node) at once.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	oDoc = ThisDoc.Document
	oSS = oDoc.SelectSet
	If oSS.Count = 0 Then
		MsgBox("A single component must be pre-selected before running this rule.", vbCritical, "")
		Exit Sub
	End If
	Dim oOcc As ComponentOccurrence
	If TypeOf oSS.Item(1) Is ComponentOccurrence Then
		oOcc = oSS.Item(1)
	Else
		MsgBox("A single component must be pre-selected before running this rule.", vbCritical, "")
		Exit Sub
	End If
	Dim oPane As BrowserPane = oDoc.BrowserPanes.Item("AmBrowserArrangement") 'using its 'InternalName'
	Dim oOccNode As BrowserNode = oPane.GetBrowserNodeFromObject(oOcc)
	Dim oFMNode As BrowserNode = GetBrowserNodeByLabel(oOccNode, "Folded Model")
	Dim oOriginNode As BrowserNode = Nothing
	If IsNothing(oFMNode) Then
		oOriginNode = GetBrowserNodeByLabel(oOccNode, "Origin")
	Else
		oOriginNode = GetBrowserNodeByLabel(oFMNode, "Origin")
	End If
	If IsNothing(oOriginNode) Then
		Exit Sub
	Else
		oOriginNode.Expanded = True
	End If
End Sub

Function GetBrowserNodeByLabel(oStartBNode As BrowserNode, oLabel As String) As BrowserNode
	If IsNothing(oStartBNode) Then Return Nothing
	'look at this level completely first
	For Each oNode As BrowserNode In oStartBNode.BrowserNodes
		If oNode.BrowserNodeDefinition.Label = oLabel Then Return oNode
	Next
	'if nothing returned, now try stepping down into lower levels
	For Each oNode As BrowserNode In oStartBNode.BrowserNodes
		If oNode.BrowserNodes.Count &amp;gt; 0 Then GetBrowserNodeByLabel(oNode, oLabel)
	Next
	Return Nothing
End Function&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 12:30:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11182374#M36935</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-20T12:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11183010#M36936</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this should work for you. There might be another "special" nested browser node situation, but I can't remember what that would be right now ( Frame Generator parts maybe?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case this version works with pre-selecting standard files and sheet metal files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank" rel="noopener"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SelectSet&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;sSet&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;'exit rule&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&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;sSet&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

&lt;SPAN&gt;Try&lt;/SPAN&gt;: &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Parent&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Model"&lt;/SPAN&gt;) _
.&lt;SPAN&gt;GetBrowserNodeFromObject&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;Try&lt;/SPAN&gt;: &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Parent&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Model"&lt;/SPAN&gt;) _
.&lt;SPAN&gt;GetBrowserNodeFromObject&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Folded Model"&lt;/SPAN&gt;) _
.&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 17:26:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11183010#M36936</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2022-05-20T17:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11186285#M36937</link>
      <description>&lt;P&gt;Thank you both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both solutions works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 06:55:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11186285#M36937</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2022-05-23T06:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11674914#M36938</link>
      <description>&lt;P&gt;Is it possible to get any of these routines to work for multiple selected components?&lt;/P&gt;&lt;P&gt;They only work on one component at a time.&amp;nbsp; It'd be great to be able to select two (or more) components and expand both their Origin Folders at once.&lt;/P&gt;&lt;P&gt;It would make it so much easier when constraining two components to each others origin planes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;27 versions of Inventor and they still make it so hard to work with Origin Planes.&amp;nbsp; Ugh.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 15:44:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11674914#M36938</guid>
      <dc:creator>tgregory3G7FA</dc:creator>
      <dc:date>2023-01-12T15:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11675099#M36939</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5303485"&gt;@tgregory3G7FA&lt;/a&gt;.&amp;nbsp; You can give this version a try.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;oDoc = ThisDoc.Document
oSS = oDoc.SelectSet : If oSS.Count = 0 Then Return
oMP = oDoc.BrowserPanes.Item("Model")
For Each oObj In oSS
	If TypeOf oObj Is ComponentOccurrence Then
		Dim oOcc As ComponentOccurrence = oObj
		oNodes = oMP.GetBrowserNodeFromObject(oOcc).BrowserNodes
		Try : oNodes.Item("Origin").Expanded = True: Catch : End Try
		Try : oNodes.Item("Folded Model").BrowserNodes.Item("Origin").Expanded = True: Catch : End Try
	End If
Next&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Jan 2023 16:48:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11675099#M36939</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-01-12T16:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11675108#M36940</link>
      <description>&lt;P&gt;Brilliant!&lt;/P&gt;&lt;P&gt;Works on multiple components and sheet metal.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 16:53:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/11675108#M36940</guid>
      <dc:creator>tgregory3G7FA</dc:creator>
      <dc:date>2023-01-12T16:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12185813#M36941</link>
      <description>&lt;P&gt;Thank you gentlemen! I can't believe I've used Inventor for years, hating having to "Find in Browser" -&amp;gt; + + till you get to Origin.... Finally, a shortcut for that. Also, the option to use iLogic buttons in the ribbon is downright awesome.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:00:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12185813#M36941</guid>
      <dc:creator>emanuel.c</dc:creator>
      <dc:date>2023-08-21T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196942#M36942</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the code which works beautifully.&lt;/P&gt;&lt;P&gt;I would like to expand the main assembly origin also. Have tried a few things, but can't manage to get it to work.&lt;/P&gt;&lt;P&gt;Can you help me with this?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 15:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196942#M36942</guid>
      <dc:creator>emanuel.c</dc:creator>
      <dc:date>2023-08-25T15:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196977#M36943</link>
      <description>&lt;P&gt;Try this.&amp;nbsp; It expands the main assembly origin. And it'll expand any sub assemblies if selected too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'Expand Assembly Origin Folder&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;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveEditDocument&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPane&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserPane&lt;/SPAN&gt;
&lt;SPAN&gt;oPane&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;ActivePane&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDocNode&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserNode&lt;/SPAN&gt;
&lt;SPAN&gt;oDocNode&lt;/SPAN&gt; = &lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;TopNode&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserNode&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDocNode&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;	
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt;.&lt;SPAN&gt;FullPath&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;oNode&lt;/SPAN&gt;.&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;'Expand Selected Component(s) Origin Folder&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;oSS&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt; : &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oSS&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;oMP&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Model"&lt;/SPAN&gt;)
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oObj&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSS&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;TypeOf&lt;/SPAN&gt; &lt;SPAN&gt;oObj&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&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;oObj&lt;/SPAN&gt;
		&lt;SPAN&gt;oNodes&lt;/SPAN&gt; = &lt;SPAN&gt;oMP&lt;/SPAN&gt;.&lt;SPAN&gt;GetBrowserNodeFromObject&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;
		&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Folded Model"&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;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, 25 Aug 2023 15:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196977#M36943</guid>
      <dc:creator>tgregory3G7FA</dc:creator>
      <dc:date>2023-08-25T15:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196985#M36944</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7488742"&gt;@emanuel.c&lt;/a&gt;.&amp;nbsp; Here is an example iLogic rule you can review for expanding the Origin folder of any type of document (including sheet metal part).&amp;nbsp; It uses a separate custom Function to get the Model pane, which is good in all languages, due to its use of their internal names, instead of local English names.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	Dim oDoc As Document = ThisDoc.Document
	Dim oModelPane As BrowserPane = GetModelBrowserPane(oDoc)
	Try : oModelPane.TopNode.BrowserNodes.Item("Origin").Expanded = True: Catch : End Try
	Try : oModelPane.TopNode.BrowserNodes.Item("Folded Model").BrowserNodes.Item("Origin").Expanded = True : Catch : End Try
End Sub

Function GetModelBrowserPane(oDoc As Inventor.Document) As Inventor.BrowserPane
	For Each oPane As Inventor.BrowserPane In oDoc.BrowserPanes
		If oPane.BuiltIn And oPane.TreeBrowser And _
			(oPane.InternalName = "AmBrowserArrangement" Or _
			oPane.InternalName = "DlHierarchy" Or _
			oPane.InternalName = "PmDefault") Then Return oPane
	Next : Return Nothing
End Function&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 15:55:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12196985#M36944</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-08-25T15:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197028#M36945</link>
      <description>&lt;P&gt;Thank you to both, it works beautifully. Since I frequently need both the selected part(s) and the main assembly Origins expanded it's nice to do it with one key stroke.&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;oModelPane&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserPane&lt;/SPAN&gt; = &lt;SPAN&gt;GetModelBrowserPane&lt;/SPAN&gt;(&lt;SPAN&gt;oDoc&lt;/SPAN&gt;)
&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oModelPane&lt;/SPAN&gt;.&lt;SPAN&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oModelPane&lt;/SPAN&gt;.&lt;SPAN&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Folded Model"&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;oSS&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt; : &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oSS&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;oMP&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Model"&lt;/SPAN&gt;)
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oObj&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSS&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;TypeOf&lt;/SPAN&gt; &lt;SPAN&gt;oObj&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&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;oObj&lt;/SPAN&gt;
		&lt;SPAN&gt;oNodes&lt;/SPAN&gt; = &lt;SPAN&gt;oMP&lt;/SPAN&gt;.&lt;SPAN&gt;GetBrowserNodeFromObject&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;
		&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;Try&lt;/SPAN&gt; : &lt;SPAN&gt;oNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Folded Model"&lt;/SPAN&gt;).&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Origin"&lt;/SPAN&gt;).&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&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;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;Function&lt;/SPAN&gt; &lt;SPAN&gt;GetModelBrowserPane&lt;/SPAN&gt;(&lt;SPAN&gt;oDoc&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;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPane&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oPane&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPane&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserPanes&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;BuiltIn&lt;/SPAN&gt; &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;TreeBrowser&lt;/SPAN&gt; &lt;SPAN&gt;And&lt;/SPAN&gt; _
			(&lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;InternalName&lt;/SPAN&gt; = &lt;SPAN&gt;"AmBrowserArrangement"&lt;/SPAN&gt; &lt;SPAN&gt;Or&lt;/SPAN&gt; _
			&lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;InternalName&lt;/SPAN&gt; = &lt;SPAN&gt;"DlHierarchy"&lt;/SPAN&gt; &lt;SPAN&gt;Or&lt;/SPAN&gt; _
			&lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;InternalName&lt;/SPAN&gt; = &lt;SPAN&gt;"PmDefault"&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;oPane&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt; : &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Function&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 16:11:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197028#M36945</guid>
      <dc:creator>emanuel.c</dc:creator>
      <dc:date>2023-08-25T16:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197193#M36946</link>
      <description>&lt;P&gt;While the topic is still fresh, I went ahead and transformed the two main tasks out into their own separate routines, to make the more transferable into other projects.&amp;nbsp; And in the process, I just integrated the separate routine for getting the Model BrowserPane into the new routine for expanding the main document's origin node.&amp;nbsp; Although, I guess that maybe the words "Origin" &amp;amp; "Folded Model" may be different in other languages, so it may still not be 100% universal for all languages.&amp;nbsp; I attached the code in a text file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 17:23:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197193#M36946</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-08-25T17:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic: Expand "Origin" in the Model Tree</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197202#M36947</link>
      <description>&lt;P&gt;Beautiful work! It's probably simple / short code to you, but can't tell you how grateful I am to be able to do this with one keystroke &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 17:27:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-expand-quot-origin-quot-in-the-model-tree/m-p/12197202#M36947</guid>
      <dc:creator>emanuel.c</dc:creator>
      <dc:date>2023-08-25T17:27:39Z</dc:date>
    </item>
  </channel>
</rss>

