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

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
Next

in 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