<?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: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210756#M36451</link>
    <description>&lt;P&gt;I totally spaced on the proxy thing concerning the node's returned component object.&amp;nbsp; Should have tested TypeOf against both ComponentOccurrence and for ComponentOccurrenceProxy, then maybe not declared the variable's Type beforehand so it could hold either one.&amp;nbsp; Sometimes it seems like I'm trying to contemplate 10 different things at once, then end up making those kinds of mistakes.&amp;nbsp; I knew you would figure it out though. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 14:57:25 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2022-06-02T14:57:25Z</dc:date>
    <item>
      <title>Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205787#M36433</link>
      <description>&lt;P&gt;I'm looping through the nodes and it seems like when using the API DoPreSelect that in the tree the node will put the box around the node to identify the node as being PreSelected but the component in the view doesn't highlight blue like when this occurs manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DoSelect works correctly in both manual and API. The tree highlights the node in blue and the components turn a greenish color in the view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="TiffanyHaydenSWQYG_0-1654023872937.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074310iD9465443A64BA156/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TiffanyHaydenSWQYG_0-1654023872937.png" alt="TiffanyHaydenSWQYG_0-1654023872937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TiffanyHaydenSWQYG_1-1654023989122.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074312i9E06B0495C651FEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TiffanyHaydenSWQYG_1-1654023989122.png" alt="TiffanyHaydenSWQYG_1-1654023989122.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 19:11:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205787#M36433</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-05-31T19:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205960#M36434</link>
      <description>&lt;P&gt;If you run the code right through it will not highlight the views but if you place a message after the pre highlighting you can see the results. The preselected nodes are not stored it would seem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 20:28:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205960#M36434</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-05-31T20:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205968#M36435</link>
      <description>&lt;P&gt;So I put a stop in the code right after the DoPreSelect and it doesn't highlight. A message box would act like a stop in VBA I would assume.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 20:31:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11205968#M36435</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-05-31T20:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11206108#M36436</link>
      <description>&lt;P&gt;I was using ilogic environment. If you can share the VBA code for this section I can check for the same results here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 21:26:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11206108#M36436</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-05-31T21:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11207551#M36437</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example. I was writing an iterative function but I wrote something smaller that dives in from the Sheet/Drawingview/SectionView/Assembly. And does a DoPreSelect on the Assembly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Function PreSelectTest()


    Dim oDrawView As DrawingView: Set oDrawView = ThisApplication.CommandManager.Pick(kDrawingViewFilter, "Pick View.")
    Dim oDoc As DrawingDocument: Set oDoc = ThisApplication.ActiveDocument
    
    On Error Resume Next
    'Early Exit
    If oDoc Is Nothing Then Exit Function
    
    Dim i As Integer
    Dim oNode As BrowserNode
    Dim oBrowser As BrowserPane
    Dim oSheet As Sheet: Set oSheet = oDrawView.Parent
    Dim oNativeObject As Object
    Dim oSubNodes As BrowserNodesEnumerator
    Dim oSubNode As BrowserNode
    Dim oSubNodes2 As BrowserNodesEnumerator
    Dim oSubNode2 As BrowserNode
    Dim oNativeObject2 As Object
    Dim oSubNodes3 As BrowserNodesEnumerator
    Dim oSubNode3 As BrowserNode
    Dim oNativeObject3 As Object
    
    For Each oBrowser In oDoc.BrowserPanes
        If oBrowser.Name = "Model" Then
            'FIND THE SHEET
            For i = 1 To oBrowser.TopNode.BrowserNodes.Count
                Set oNode = oBrowser.TopNode.BrowserNodes.item(i)

                If Not oNode Is Nothing Then
                    If oNode.BrowserNodes.Count &amp;gt; 0 Then
                        If oNode.BrowserNodeDefinition.Label = oSheet.Name Then
                            Set oSubNodes = oNode.BrowserNodes
                            'FIND THE DRAWING VIEW
                            For Each oSubNode In oSubNodes
                                Set oNativeObject = oSubNode.NativeObject
                                
                                If TypeOf oNativeObject Is DrawingView Then
                                    Set oSubNodes2 = oSubNode.BrowserNodes
                                    'FIND THE SECTION VIEW
                                    For Each oSubNode2 In oSubNodes2
                                        Set oNativeObject2 = oSubNode2.NativeObject
                                        
                                        If TypeOf oNativeObject2 Is SectionDrawingView Then
                                            Set oSubNodes3 = oSubNode2.BrowserNodes
                                            'FIND THE FIRST ASSEMBLY
                                            For Each oSubNode3 In oSubNodes3
                                                Set oNativeObject3 = oSubNode3.NativeObject
                                                
                                                If oNativeObject.DefinitionDocumentType = kAssemblyDocumentObject Then
                                                    'PRESELECT
                                                    oSubNode3.DoPreSelect
                                                    Debug.Print ("stop") 'add stop here to see the PreSelect
                                                End If
                                            Next
                                        End If
                                    Next
                                End If
                            Next
                        End If
                    End If
                End If
            Next
        End If
    Next
    
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 12:40:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11207551#M36437</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T12:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11207922#M36438</link>
      <description>&lt;P&gt;I haven't had a chance to try the vba code but I did use a physical messagebox in the ilogic version in order to slow down and stop the code to allow user Interaction and see the graphics update. You could also try&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ThisApplication.UserInterfaceManager.DoEvents()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The symptoms look very similar to this &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/display-doesn-t-update-selection-highlighting-after-selectset/m-p/9644583#M113457" target="_blank" rel="noopener"&gt;post&lt;/A&gt;. What is the ultimate goal with the preselect?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 14:36:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11207922#M36438</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-06-01T14:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208011#M36439</link>
      <description>&lt;P&gt;So I would like the preselect to mimic what is done manually. When you over a selectable node the component will turn blue in the view. The DoSelect works the same both manually and using the API. But the DoPreSelect does not. The blue would be more vibrant for the user than the greenish color using the DoSelect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just added this and it doesn't seem to fix the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    oDoc.SelectSet.Clear
    ThisApplication.ActiveView.Update
    For Each oNode In oCollectSelects
        Call oDoc.SelectSet.Select(oNode)
    Next
    Call ThisApplication.UserInterfaceManager.DoEvents
    ThisApplication.ActiveView.Update&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 15:05:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208011#M36439</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T15:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208042#M36440</link>
      <description>&lt;P&gt;Looks like you only have to do this!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oNode.DoPreSelect&lt;BR /&gt;ThisApplication.ActiveView.Update&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The blue starts showing up!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 15:13:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208042#M36440</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T15:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208131#M36441</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;Have you ever been successful at multiselect nodes on a drawing? I've used the selectset.SelectMultiple and it doesn't work because the nodes aren't entities. But when you add the oNode.NativeObject that doesn't work either. Just thought I'd ask.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 15:46:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208131#M36441</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T15:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208453#M36442</link>
      <description>&lt;P&gt;My next suggestion would be to maybe use a &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-2EE6AA49-67A0-41CC-B391-E8D718D6F065" target="_blank" rel="noopener"&gt;HighlightSet&lt;/A&gt;, then specify what specific color you want it to be.&amp;nbsp; But that would require a lot more processing, because you could not simply add the nodes to it, you would have to add the drawing geometry to it.&amp;nbsp; You could get the drawing geometry by capturing the node's native object, then using the drawingview's &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-EA418190-71E1-49CF-A0E8-DEB35728A018" target="_blank" rel="noopener"&gt;DrawingCurves&lt;/A&gt; property, then loop them, adding them to an &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-6C4C98CB-8909-48EF-B73E-F663424D5B41" target="_blank" rel="noopener"&gt;ObjectCollection&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 17:45:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208453#M36442</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-06-01T17:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208474#M36443</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;Would it be something like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    Dim oDrawCurves As DrawingCurvesEnumerator
    Dim oHSet  As HighlightSet
    
    For Each oNode In oCollectSelects
        Set oDrawCurves = GetOccDrawingCurves(oDrawView, oNode.NativeObject)
        Set oHSet = oDoc.CreateHighlightSet
        Call oHSet.AddItem(oDrawCurves)
        oHSet.Color = ThisApplication.TransientObjects.CreateColor(0, 255, 0)

    Next&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 17:55:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208474#M36443</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T17:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208642#M36444</link>
      <description>&lt;P&gt;I wasn't able to throw together a proper example of this in VBA before I leave, but I created some iLogic code that contains most of the process for doing what I was suggesting.&amp;nbsp; I am not including a proper way to identify the BrowserNode to represent the one you were trying the pre-select thing on.&amp;nbsp; This code also assumes that this browser node is representing an assembly component.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	oDDoc = ThisDrawing.Document
	oMPane = oDDoc.BrowserPanes.Item("Model")
	'oObj = oDDoc.SelectSet.Item(1)
	
	'&amp;lt;&amp;lt;&amp;lt;&amp;lt; set a value here, one way or another &amp;gt;&amp;gt;&amp;gt;&amp;gt;
	Dim oCompNode As BrowserNode = Nothing
	'oCompNode = oMPane.GetBrowserNodeFromObject(oObj)
	'oCompNode = oObj
	
	Dim oComp As ComponentOccurrence = Nothing
	Dim oParentView As DrawingView = Nothing
	Try
		If TypeOf oCompNode.NativeObject Is ComponentOccurrence Then
			oComp = oCompNode.NativeObject
			oParentView = FindNodeParentView(oCompNode)
		End If
	Catch
	End Try
	If IsNothing(oComp) Or IsNothing(oParentView) Then Exit Sub
	Dim oDCurves As DrawingCurvesEnumerator = Nothing
	Try
		oDCurves = oParentView.DrawingCurves(oComp)
	Catch
		Exit Sub
	End Try
	Dim oTO As TransientObjects = ThisApplication.TransientObjects
	Dim oObjColl As ObjectCollection = oTO.CreateObjectCollection
	For Each oDCurve As DrawingCurve In oDCurves
		oObjColl.Add(oDCurve)
	Next
	Dim oHLSet As HighlightSet = oDDoc.CreateHighlightSet
	oHLSet.AddMultipleItems(oObjColl)
	oHLSet.Color = oTO.CreateColor(0, 255, 0)
End Sub

Function FindNodeParentView(oInputNode As BrowserNode) As DrawingView
	If TypeOf oInputNode.Parent Is BrowserPane Then Return Nothing
	If TypeOf oInputNode.Parent Is BrowserNode Then
		Dim oParentNode As BrowserNode = oInputNode.Parent
		Try 'sometimes checking NativeObject throws Error
			If TypeOf oParentNode.NativeObject Is DrawingView Then
				Dim oDView As DrawingView = oParentNode.NativeObject
				Return oDView
			Else
				FindNodeParentView(oParentNode)
			End If
		Catch
		End Try
	End If
	Return Nothing
End Function&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208642#M36444</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-06-01T18:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208656#M36445</link>
      <description>&lt;P&gt;Great Thank you I'll check it out!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 19:03:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208656#M36445</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T19:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208910#M36446</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;Would you know why I can't use the NativeObject of the node to get the drawing curves. I'm getting an error when I try to get the drawing curves for the native object. Even though it's a component occurrence.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    Dim oDrawCurve As DrawingCurve
    Dim oDrawCurves As DrawingCurvesEnumerator
    Dim oHSet  As HighlightSet
    Dim oCollectCurves As ObjectCollection: Set oCollectCurves = ThisApplication.TransientObjects.CreateObjectCollection
    Dim oOccNode As ComponentOccurrence
    
    For Each oNode In oCollectSelects
        Set oOccNode = oNode.NativeObject
        Set oDrawCurves = oDrawView.DrawingCurves(oOccNode) 'GetOccDrawingCurves(oDrawView, oOccNode) '


    Next&lt;/LI-CODE&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="TiffanyHaydenSWQYG_0-1654116802092.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074983iEAF4C2C8E0312204/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TiffanyHaydenSWQYG_0-1654116802092.png" alt="TiffanyHaydenSWQYG_0-1654116802092.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TiffanyHaydenSWQYG_1-1654116821263.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074984i532BEF78C2FE2A1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TiffanyHaydenSWQYG_1-1654116821263.png" alt="TiffanyHaydenSWQYG_1-1654116821263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 20:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208910#M36446</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-01T20:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208968#M36447</link>
      <description>&lt;P&gt;If I am not mistaken you should be setting a Drawing curve rather than setting a collection&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; Set oDrawCurve = oDrawView.DrawingCurves(oOccNode)&lt;/LI-CODE&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DrawingCurvesEnumerator.&lt;STRONG&gt;Item&lt;/STRONG&gt;( &lt;STRONG&gt;&lt;I&gt;Index&lt;/I&gt;&lt;/STRONG&gt; As Long ) As &lt;A href="mk:@MSITStore:C:\Users\Public\Documents\Autodesk\Inventor%202020\Local%20Help\ADMAPI_24_0.chm::/HTML/DrawingCurve.htm" target="_blank" rel="noopener"&gt;DrawingCurve&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/manufacturing/2014/10/expand-browser-and-select-part-by-selecting-edge-in-drawing-view.html" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is a post that may help you out some bit.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 21:22:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11208968#M36447</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-06-01T21:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210222#M36448</link>
      <description>&lt;P&gt;It looks like it's set right. I wonder if there is something wrong with using the component occurrence from a node it doesn't like. Even though the native object from a node, in this case, is a component occurrence, it should be able to be used in this situation.&amp;nbsp;&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="TiffanyHaydenSWQYG_0-1654169558789.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1075261iDEC9E43BC95337A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TiffanyHaydenSWQYG_0-1654169558789.png" alt="TiffanyHaydenSWQYG_0-1654169558789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 11:33:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210222#M36448</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-02T11:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210728#M36449</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;&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;Found a solution using the highlight.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Collect all parts/Assemblies in the view as componentoccurrenceproxy's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- compare the node to the parts in the collection. Part.nativeobject. Comparing ComponentOccurrence to ComponentOccurence.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Loop through the nodes. Once you get the component occurrence proxy, use that to get the drawing curves.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Loop through the drawing curves and then loop through the segments on the drawing curves.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Add the segments to the collection&lt;/P&gt;&lt;P&gt;- create a highlightset&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Use the AddMultipleItems on the HighLightSet to add the collection of segments&lt;/P&gt;&lt;P&gt;- Change the color of the set (If needed).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick for me was using the componentoccurrenceproxy instead of the NativeObject from the node. You have to use a proxy if you are doing sub/nodes. Nodes within nodes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    Dim oCollectComps As ObjectCollection: Set oCollectComps = CollectOcc_Iterative(oDrawView, kPartDocumentObject)
    Dim oOcc As ComponentOccurrence
    Dim oDrawCurve As DrawingCurve
    Dim oDrawCurveSeg As DrawingCurveSegment
    Dim oDrawCurves As DrawingCurvesEnumerator
    Dim oCollectCurves As ObjectCollection: Set oCollectCurves = ThisApplication.TransientObjects.CreateObjectCollection
    Dim oHSet As HighlightSet
    
    
    For Each oNode In oCollectSelects
        Set oNativeObject = oNode.NativeObject
    
        For Each oOcc In oCollectComps
            If oOcc.NativeObject Is oNativeObject Then
                Set oDrawCurves = oDrawView.DrawingCurves(oOcc)
                For Each oDrawCurve In oDrawCurves
                    For Each oDrawCurveSeg In oDrawCurve.Segments
                        Call oCollectCurves.Add(oDrawCurveSeg)
                    Next
                Next
            End If
        Next
        
    Next
    
    Set oHSet = oDoc.CreateHighlightSet
    oHSet.Clear
    Call oHSet.AddMultipleItems(oCollectCurves)
    oHSet.Color = ThisApplication.TransientObjects.CreateColor(0, 255, 0)&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;</description>
      <pubDate>Thu, 02 Jun 2022 14:42:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210728#M36449</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-02T14:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210735#M36450</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 14:46:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210735#M36450</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-02T14:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210756#M36451</link>
      <description>&lt;P&gt;I totally spaced on the proxy thing concerning the node's returned component object.&amp;nbsp; Should have tested TypeOf against both ComponentOccurrence and for ComponentOccurrenceProxy, then maybe not declared the variable's Type beforehand so it could hold either one.&amp;nbsp; Sometimes it seems like I'm trying to contemplate 10 different things at once, then end up making those kinds of mistakes.&amp;nbsp; I knew you would figure it out though. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 14:57:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210756#M36451</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-06-02T14:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210764#M36452</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; Thanks! It took a lot of forum searches and piecing stuff together! lol But that's programming life.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 15:00:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-tree-nodes-dopreselect-not-highlighting-components-blue/m-p/11210764#M36452</guid>
      <dc:creator>Tiffany_Hayden_</dc:creator>
      <dc:date>2022-06-02T15:00:55Z</dc:date>
    </item>
  </channel>
</rss>

