Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I have a problem with the export of virtual components present in the BOM, I used this rule that in iLogic works correctly while in Visual studio it does not generate any row in the excel sheet.
For Each oRow As BOMRow In oBomRows
Dim oPropSets As PropertySets
oPropSets = oCompDef.Document.PropertySets
Dim oDesignTrackingPropertySet = oPropSets.Item("Design Tracking Properties")
If TypeOf oRow.ComponentDefinitions.Item(1) Is VirtualComponentDefinition Then
ESBomRow.iPartNumber = oRow.ComponentDefinitions.Item(1).PropertySets("Design Tracking Properties")("Part Number").Value
ESBomRow.iStockNumber = oRow.ComponentDefinitions.Item(1).PropertySets("Design Tracking Properties")("Stock Number").Value
ESBomRow.iDescription = oRow.ComponentDefinitions.Item(1).PropertySets("Design Tracking Properties")("Description").Value
Else
ESBomRow.iPartNumber = oDesignTrackingPropertySet.Item("Part Number").Value
ESBomRow.iStockNumber = oDesignTrackingPropertySet.Item("Stock Number").Value
ESBomRow.iDescription = oDesignTrackingPropertySet.Item("Description").Value
End If
Next
The virtual parts can be both in the main assembly and in the subassemblies.
Thanks.
Solved! Go to Solution.