04-05-2023
05:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-05-2023
05:02 AM
override bom quantity in subassembly
hi,
i want to override a certain rule in the BOM of a subassembly.
Dim AutoBOM As BOM = Subocc.Definition.BOM
Dim oBOMrow As BOMRow
For Each oBOMrow In AutoBOM.BOMViews.Item(1).BOMRows
If oBOMrow.ComponentDefinitions.Item(1).Document.Propertysets.Item("Design Tracking Properties").Item("Part Number").Expression = 483385 Then
oBOMrow.TotalQuantity = 5
Exit For
End If
Nextin this case i want to override the quantity of a part with partnumber 483385.
i thought when searching through BOM.Bomviews.item(1) "Unnamed" it would make the changes in the model data tab of the BOM.
However, when i excecute this rule it doesn't seem to override anything and the quantity stays at 1.
anyone know how to do this? ilogic functions like thisbom.overridequantity cannot be used in subassemblies.
kind regards,
Geert