<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic override bom quantity in subassembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874386#M151003</link>
    <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to override a certain rule in the BOM of a subassembly.&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;in this case i want to override the quantity of a part with partnumber 483385.&lt;/P&gt;&lt;P&gt;i thought when searching through BOM.Bomviews.item(1) "Unnamed"&amp;nbsp; it would make the changes in the model data tab of the BOM.&lt;/P&gt;&lt;P&gt;However, when i excecute this rule it doesn't seem to override anything and the quantity stays at 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyone know how to do this? ilogic functions like thisbom.overridequantity cannot be used in subassemblies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geert&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 12:02:22 GMT</pubDate>
    <dc:creator>GeertvanderHeide</dc:creator>
    <dc:date>2023-04-05T12:02:22Z</dc:date>
    <item>
      <title>override bom quantity in subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874386#M151003</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to override a certain rule in the BOM of a subassembly.&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;in this case i want to override the quantity of a part with partnumber 483385.&lt;/P&gt;&lt;P&gt;i thought when searching through BOM.Bomviews.item(1) "Unnamed"&amp;nbsp; it would make the changes in the model data tab of the BOM.&lt;/P&gt;&lt;P&gt;However, when i excecute this rule it doesn't seem to override anything and the quantity stays at 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyone know how to do this? ilogic functions like thisbom.overridequantity cannot be used in subassemblies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geert&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 12:02:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874386#M151003</guid>
      <dc:creator>GeertvanderHeide</dc:creator>
      <dc:date>2023-04-05T12:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: override bom quantity in subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874441#M151005</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11602102"&gt;@GeertvanderHeide&lt;/a&gt;.&amp;nbsp; The first detail that jumps out at me when reviewing your code is that the value of an iProperty's 'Expression' is always a String, and the value you are testing for is not quoted, which will fail.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 12:19:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874441#M151005</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-04-05T12:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: override bom quantity in subassembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874479#M151008</link>
      <description>&lt;P&gt;well, when the string is only a number it can compare to integers ,right?&lt;/P&gt;&lt;P&gt;code didn't bug out on it. the exit for also worked when using this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;okay, so i tested the code again, and somehow it does work now.. without any changes...&lt;/P&gt;&lt;P&gt;maybe inventor needs some motivation to work i guess..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the quick response anyway &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 12:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/override-bom-quantity-in-subassembly/m-p/11874479#M151008</guid>
      <dc:creator>GeertvanderHeide</dc:creator>
      <dc:date>2023-04-05T12:32:16Z</dc:date>
    </item>
  </channel>
</rss>

