<?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: Getting component from Browsernode in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9568542#M111817</link>
    <description>&lt;P&gt;heck this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserPane&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Model"&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;On&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Error&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Resume&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;

    &lt;SPAN style="color: #808080;"&gt;' Get the last visible child node under the sub-assembly occurrence&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserFolder&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Long&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserFolders&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Count&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;To&lt;/SPAN&gt; 1 &lt;SPAN style="color: #ff0000;"&gt;Step&lt;/SPAN&gt; -1
                 &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserFolders&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt;)
			 &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Name&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"NOZZLE"&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
				&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserNode&lt;/SPAN&gt;
				&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserNodes&lt;/SPAN&gt;
					&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;occ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;NativeObject&lt;/SPAN&gt;
					&lt;SPAN style="color: #800000;"&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Show&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;occ&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;name&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Title"&lt;/SPAN&gt;)
				&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
                         &lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 Jun 2020 06:56:21 GMT</pubDate>
    <dc:creator>marcin_otręba</dc:creator>
    <dc:date>2020-06-09T06:56:21Z</dc:date>
    <item>
      <title>Getting component from Browsernode</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9567981#M111806</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a method that finds the browsernode from the component by using NativeObject. What is the method of doing it the other way round? i.e. finding the object from the Browsernode? I am trying to turn off the components in the assembly but i only have the browser nodes in my method as i am looping them by folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The RepNode.NativeObject is the Browsernode and i need to check if its an assembly. If it is, i need to run all child components visiblity off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dim RepNodes As BrowserNodesEnumerator = oFolder.BrowserNode.BrowserNodes
                        For Each RepNode As BrowserNode In RepNodes
                            If oFolder.Name = oViewRep.Name Then
                                RepNode.NativeObject.Visible = True
                                If oFolder.Name = "NOZZLE" Then
                                  'LOOP THE TOP LEVEL COMPONENTS
                                   'IF COMPONENT IS ASSEMBLY,
                                   'LOOP CHILD COMPONENTS AND TURN OFF
                                End If
                            End If
                        Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 21:44:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9567981#M111806</guid>
      <dc:creator>NachitoMax</dc:creator>
      <dc:date>2020-06-08T21:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting component from Browsernode</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9568542#M111817</link>
      <description>&lt;P&gt;heck this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserPane&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserPanes&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Model"&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;On&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Error&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Resume&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;

    &lt;SPAN style="color: #808080;"&gt;' Get the last visible child node under the sub-assembly occurrence&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserFolder&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Long&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserFolders&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Count&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;To&lt;/SPAN&gt; 1 &lt;SPAN style="color: #ff0000;"&gt;Step&lt;/SPAN&gt; -1
                 &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oPane&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TopNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserFolders&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;i&lt;/SPAN&gt;)
			 &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Name&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"NOZZLE"&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
				&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;BrowserNode&lt;/SPAN&gt;
				&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oTargetNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserNode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;BrowserNodes&lt;/SPAN&gt;
					&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;occ&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;onode&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;NativeObject&lt;/SPAN&gt;
					&lt;SPAN style="color: #800000;"&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Show&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;occ&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;name&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Title"&lt;/SPAN&gt;)
				&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
                         &lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jun 2020 06:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9568542#M111817</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2020-06-09T06:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting component from Browsernode</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9569894#M111863</link>
      <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i figure it out last night, i needed to make an occurrence and assign the browsernode to it&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;If oFolder.Name = "NOZZLE" Then
   Dim oComp As ComponentOccurrence = RepNode.NativeObject
   If oComp.DefinitionDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
      For Each SubComp As ComponentOccurrence In oComp.SubOccurrences
         SubComp.Visible = False
      Next
   End If
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:35:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-component-from-browsernode/m-p/9569894#M111863</guid>
      <dc:creator>NachitoMax</dc:creator>
      <dc:date>2020-06-09T16:35:17Z</dc:date>
    </item>
  </channel>
</rss>

