Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
264 Views, 0 Replies

Getting the parent Occurence from a promoted BOM row of a virtual component

Hi,

 

i'm looking for a method to get the parent occurence from a promoted BOM row of a virtual component from outside the drawing

 

Dim oDrawDoc As Inventor.DrawingDocument = m_inventorApplication.ActiveDocument
Dim oActiveSheet As Inventor.Sheet = oDrawDoc.ActiveSheet
Dim oDrawingviews As Inventor.DrawingViews = oActiveSheet.DrawingViews
Dim oDrawingView As Inventor.DrawingView = oDrawingviews.Item(1)
Dim oRefDoc As Inventor.AssemblyDocument = oDrawingView.ReferencedFile.ReferencedDocument
Dim oBOM As Inventor.BOM = oRefDoc.ComponentDefinition.BOM
Dim oBOMView As Inventor.BOMView = oBOM.BOMViews.Item("Structured")
Dim oBomRow As Inventor.BOMRow = oBOMView.BOMRows(strPos)

If oBomRow.Promoted = True Then

'Set a reference to the primary ComponentDefinition of the row -> this is the componentdefinition of the virtual component
Dim oCompDef As Inventor.ComponentDefinition = oBomRow.ComponentDefinitions.Item(1)

 

Now i need to get the parent Occurence which is set to phantom.

When i look into the BOM in Inventor and I hover over the row it displays the parents name.

How do i get this?

 

Regards,

 

Geert