- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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