<?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 Getting the parent Occurence from a promoted BOM row of a virtual component in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-the-parent-occurence-from-a-promoted-bom-row-of-a/m-p/5925983#M60116</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm looking for a method to get the parent occurence from&amp;nbsp;a promoted BOM row of a virtual component from outside the drawing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oDrawDoc As Inventor.DrawingDocument = m_inventorApplication.ActiveDocument&lt;BR /&gt;Dim oActiveSheet As Inventor.Sheet = oDrawDoc.ActiveSheet&lt;BR /&gt;Dim oDrawingviews As Inventor.DrawingViews = oActiveSheet.DrawingViews&lt;BR /&gt;Dim oDrawingView As Inventor.DrawingView = oDrawingviews.Item(1)&lt;BR /&gt;Dim oRefDoc As Inventor.AssemblyDocument = oDrawingView.ReferencedFile.ReferencedDocument&lt;BR /&gt;Dim oBOM As Inventor.BOM = oRefDoc.ComponentDefinition.BOM&lt;BR /&gt;Dim oBOMView As Inventor.BOMView = oBOM.BOMViews.Item("Structured")&lt;BR /&gt;Dim oBomRow As Inventor.BOMRow = oBOMView.BOMRows(strPos)&lt;/P&gt;&lt;P&gt;If oBomRow.Promoted = True Then&lt;/P&gt;&lt;P&gt;'Set a reference to the primary ComponentDefinition of the row -&amp;gt; this is the componentdefinition of the virtual component&lt;BR /&gt;Dim oCompDef As Inventor.ComponentDefinition = oBomRow.ComponentDefinitions.Item(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i need to get the parent Occurence which is set to phantom.&lt;/P&gt;&lt;P&gt;When i look into the BOM in Inventor and I hover over the row it displays the parents name.&lt;/P&gt;&lt;P&gt;How do i get this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geert&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2015 11:53:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-26T11:53:50Z</dc:date>
    <item>
      <title>Getting the parent Occurence from a promoted BOM row of a virtual component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-the-parent-occurence-from-a-promoted-bom-row-of-a/m-p/5925983#M60116</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm looking for a method to get the parent occurence from&amp;nbsp;a promoted BOM row of a virtual component from outside the drawing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oDrawDoc As Inventor.DrawingDocument = m_inventorApplication.ActiveDocument&lt;BR /&gt;Dim oActiveSheet As Inventor.Sheet = oDrawDoc.ActiveSheet&lt;BR /&gt;Dim oDrawingviews As Inventor.DrawingViews = oActiveSheet.DrawingViews&lt;BR /&gt;Dim oDrawingView As Inventor.DrawingView = oDrawingviews.Item(1)&lt;BR /&gt;Dim oRefDoc As Inventor.AssemblyDocument = oDrawingView.ReferencedFile.ReferencedDocument&lt;BR /&gt;Dim oBOM As Inventor.BOM = oRefDoc.ComponentDefinition.BOM&lt;BR /&gt;Dim oBOMView As Inventor.BOMView = oBOM.BOMViews.Item("Structured")&lt;BR /&gt;Dim oBomRow As Inventor.BOMRow = oBOMView.BOMRows(strPos)&lt;/P&gt;&lt;P&gt;If oBomRow.Promoted = True Then&lt;/P&gt;&lt;P&gt;'Set a reference to the primary ComponentDefinition of the row -&amp;gt; this is the componentdefinition of the virtual component&lt;BR /&gt;Dim oCompDef As Inventor.ComponentDefinition = oBomRow.ComponentDefinitions.Item(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i need to get the parent Occurence which is set to phantom.&lt;/P&gt;&lt;P&gt;When i look into the BOM in Inventor and I hover over the row it displays the parents name.&lt;/P&gt;&lt;P&gt;How do i get this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geert&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 11:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/getting-the-parent-occurence-from-a-promoted-bom-row-of-a/m-p/5925983#M60116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-26T11:53:50Z</dc:date>
    </item>
  </channel>
</rss>

