<?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 Re: Parts variables and assembly variable multiplication in BOM in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190130#M138473</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, yes it's simple one but I am not able to figure it out because one column is item qty which is system generated i guess it shows how many time (number) you use that part in assembly. and another column is custom iproperty&amp;nbsp; of parts which gives value in ''inch''. so i want multiplication of both in third column which will be custom iproperty of assembly named ''total inch''.&amp;nbsp; And i want this for all the rows in the BOM . I think now you have better idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 17:01:27 GMT</pubDate>
    <dc:creator>ABHUT_9090</dc:creator>
    <dc:date>2022-05-24T17:01:27Z</dc:date>
    <item>
      <title>Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11189723#M138455</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In the BOM , I want multiplication of column1 (lengths of parts) and column2 (Item qty of that pats) in another column3( total length required ). Can anybody help me with the ilogic code for this?&amp;nbsp; Main problem is how can we multiply this two column and get output in third column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ankit Bhut&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 14:49:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11189723#M138455</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-24T14:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190095#M138472</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;.&amp;nbsp; This seems like a fairly common type of request.&amp;nbsp; I'm pretty sure it can be accomplished.&amp;nbsp; What is the source for the information in those first two columns?&amp;nbsp; Do they both contain custom iProperties?&amp;nbsp; If one or both are one of the regular BOM quantity specifiers, which type?&amp;nbsp; There are several types of quantities involved in BOM's:&amp;nbsp; Unit Quantity, Base Quantity, Base Unit, Item Quantity (net/filtered), Total Quantity (gross/not filtered).&amp;nbsp; Do you plan on using a custom iProperty for column 3, or is it representing something else?&amp;nbsp; If that custom iProperty does not exist in every component document, then do you want it created within every unique document represented by those components?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:47:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190095#M138472</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-24T16:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190130#M138473</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, yes it's simple one but I am not able to figure it out because one column is item qty which is system generated i guess it shows how many time (number) you use that part in assembly. and another column is custom iproperty&amp;nbsp; of parts which gives value in ''inch''. so i want multiplication of both in third column which will be custom iproperty of assembly named ''total inch''.&amp;nbsp; And i want this for all the rows in the BOM . I think now you have better idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:01:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190130#M138473</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-24T17:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190213#M138476</link>
      <description>&lt;P&gt;What is the name of the custom iProperty being referenced by column 1 (part lengths)?&lt;/P&gt;
&lt;P&gt;Which view of the BOM are you wanting to be working with (Model Data, Structured, or Parts Only)?&lt;/P&gt;
&lt;P&gt;If Structured, then 'first level only' or 'all levels' (in View Options or View Properties)?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:36:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190213#M138476</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-24T17:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190261#M138477</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, custom iproperty of column 1 name is ''LENGTH''. and i want to work on parts only and structured with all level BOM view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:58:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190261#M138477</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-24T17:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190266#M138479</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;.&amp;nbsp; I created something that you may be able to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then
		MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
		Exit Sub
	End If
	Dim oADoc As AssemblyDocument = ThisDoc.Document
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oBOM As BOM = oADef.BOM
	If Not oBOM.StructuredViewEnabled Then oBOM.StructuredViewEnabled = True
	If oBOM.StructuredViewFirstLevelOnly Then oBOM.StructuredViewFirstLevelOnly = False
	Dim oBOMView As BOMView = oBOM.BOMViews.Item("Structured")
	For Each oRow As BOMRow In oBOMView.BOMRows
		Dim oRowDoc As Document = Nothing
		Try
			oRowDoc = oRow.ComponentDefinitions.Item(1).Document
		Catch
			Continue For 'skip to next BOMRow
		End Try
		If IsNothing(oRowDoc) Then Continue For
		Dim oPartLength As Double = 0.0
		Dim oCProps As PropertySet = oRowDoc.PropertySets.Item("Inventor User Defined Properties")
		Try
			oPartLength = oCProps.Item("LENGTH").Value
		Catch
			Continue For 'skip to next BOMRow
		End Try
		If oPartLength = 0.0 Then Continue For 'skip to next BOMRow
		Dim oQty As Integer = oRow.ItemQuantity
		Dim oTotalLength As Double = (oPartLength * oQty)
		'value may need to have units converted if not correct
		Dim oTotalInchCProp As Inventor.Property = Nothing
		Try
			oTotalInchCProp = oCProps.Item("total inch")
			oTotalInchCProp.Value = oTotalLength
		Catch
			oTotalInchCProp = oCProps.Add(oTotalLength, "total inch")
		End Try
	Next
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;.&lt;/P&gt;
&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;/A&gt; :bulb: or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 18:04:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190266#M138479</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-24T18:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190320#M138481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, thank you for the code but unfortunately i did't work but i am trying to understand the code so can you please explain me this ''oPartLength''. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 18:32:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11190320#M138481</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-24T18:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11191970#M138519</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1071708iADDB06E73573E22E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, you can see in the BOM image that I actually want multiplication of this two column and get the result in the third column . is it possible with ilogic? for structured -all level and parts only BOM&amp;nbsp; views, Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 10:58:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11191970#M138519</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-25T10:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11193061#M138555</link>
      <description>&lt;P&gt;OK.&amp;nbsp; Give this one a try.&amp;nbsp; I modified it to suit what I'm seeing in that last image you posted.&amp;nbsp; It looks like each document in that assembly should have two custom iProperties.&amp;nbsp; One named "&lt;SPAN&gt;SQ_INCH" that contains a Double value in inches, and one named "&lt;/SPAN&gt;&lt;SPAN&gt;TOTAL_SQ_INCH" which you want to contain a Double value in inches that is the product of multiplying the document's 'Item Quantity' by the value of the "SQ_INCH" custom iProperty.&amp;nbsp; This code is targeting the structured view of the BOM, while it is set to the 'all levels' setting.&amp;nbsp; And it is set-up to iterate down through any 'child rows' it may find under any BOM rows.&amp;nbsp; Since these edits are being done at the document levels, these changes should also affect the contents of the 'Parts Only' view of the BOM.&amp;nbsp; So there should not be any need to also attempt to run that code on the Parts Only view.&amp;nbsp; On the other hand, if you only want these edits to effect parts, and not attempt these edits on any sub-assembly documents, you may want to only run this on the Parts Only view, in which case there should not be any 'child rows'.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I also added a lot more information to a message in the Catch side of those Try...Catch blocks, to help you understand when things are not working as planned, and where it may be having those problems.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then
		MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
		Exit Sub
	End If
	Dim oADoc As AssemblyDocument = ThisDoc.Document
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oBOM As BOM = oADef.BOM
	oBOM.PartsOnlyViewEnabled = True
	oBOM.StructuredViewEnabled = True
	oBOM.StructuredViewFirstLevelOnly = False
	Dim oStructuredView As BOMView = oBOM.BOMViews.Item("Structured")
	MultiplyBOMColumnValues(oStructuredView.BOMRows)
	'these edits were done in the documents, so they should also affect the Parts Only view
	'Dim oPartsOnlyView As BOMView = oBOM.BOMViews.Item("Parts Only")
	'MultiplyBOMColumnValues(oPartsOnlyView.BOMRows)
	oADoc.Update
End Sub

Sub MultiplyBOMColumnValues(oBOMRows As BOMRowsEnumerator)
	For Each oRow As BOMRow In oBOMRows
		Dim oRowDoc As Document = Nothing
		Try
			oRowDoc = oRow.ComponentDefinitions.Item(1).Document
		Catch oEx As Exception
			MsgBox("Failed to get Document from BOMRow Item Number " &amp;amp; oRow.ItemNumber, vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		If IsNothing(oBOMRowDoc) Then Continue For
		Dim oAREA As Double = 0.0
		Dim oCProps As PropertySet = oBOMRowDoc.PropertySets.Item("Inventor User Defined Properties")
		Try
			oAREA = oCProps.Item("SQ_INCH").Value
		Catch
			MsgBox("Problem getting value of custom iProperty named 'SQ_INCH', from" &amp;amp; vbCrLf &amp;amp; _
			"BOMRow Item Number " &amp;amp; oRow.ItemNumber, vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		If oAREA = 0.0 Then Continue For 'skip to next BOMRow
		Dim oItemQty As Integer = oRow.ItemQuantity
		Dim oTotalArea As Double = (oAREA * oItemQty)
		'value may need to have units converted if not correct
		Dim oTotalSQInchProp As Inventor.Property = Nothing
		Try
			oTotalSQInchProp = oCProps.Item("TOTAL_SQ_INCH")
			oTotalSQInchProp.Value = oTotalArea
		Catch
			MsgBox("A custom iProperty named 'TOTAL_SQ_INCH' was not found in" &amp;amp; vbCrLf &amp;amp; _
			"the document associated with BOMRow Item Number " &amp;amp; oRow.ItemNumber &amp;amp; vbCrLf &amp;amp; _
			"So the rule will attempt to create it.", vbExclamation, "")
			oTotalSQInchProp = oCProps.Add(oTotalArea, "TOTAL_SQ_INCH")
		End Try
		If Not oRow.ChildRows Is Nothing Then
			MultiplyBOMColumnValues(oRow.ChildRows)
		End If
	Next
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 18:05:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11193061#M138555</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-25T18:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194566#M138582</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;, I tried this code but in the output( column3) it shows nothing may be the units problem, can you tell me , What is the unit of itemqty ? because i change other units to unitless (ul) but it still doesn't work.&lt;/P&gt;&lt;P&gt;And also i see in code that if something don't work then it will show us message nut it doesn't show any message after running the code&amp;nbsp; ,so I think it's good news.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 11:19:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194566#M138582</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-26T11:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194687#M138585</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;.&amp;nbsp; This type of thing can be challenging to write code for remotely, due to lack of being able to test the code before posting it.&amp;nbsp; If it is not putting any value at all in the 'TOTAL_SQ_INCH' column, then that would not be because of a units problem.&amp;nbsp; There must still be something else going on preventing this from working properly.&amp;nbsp; Is the value within the "SQ_INCH" column a String (quoted), instead of a Double?&amp;nbsp; When you have one of those model documents open, and have the iProperties dialog open, and on the Custom tab, does the Type column for that custom iProperty listed as Text or Number?&amp;nbsp; If it is listed as Text, then that will be what is causing the problem.&amp;nbsp; If that custom iProperty was created automatically by checking the check box within the Parameters dialog box in the Export column for that parameter, then you will need to right-click on that parameter's row, then choose 'Custom Property Format...'.&amp;nbsp; That will open a small dialog where you can change the property type from text to Number, and set the other related options like Units and Precision.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure that the Item Quantity is always just a unit-less Integer, representing the 'net' (as apposed to 'gross') number of components found within the assembly.&amp;nbsp; Those other similar sounding quantity related properties are set within each model document by opening the model files, then going to the Tools tab, then clicking on Document Settings, which will open a dialog.&amp;nbsp; Then click on the 'Bill of Materials' tab within that dialog.&amp;nbsp; That is where you set Default BOM Structrue, Unit Quantity, Base Quantity, &amp;amp; Base Unit.&amp;nbsp; Those are used by the BOM to help determine actual quantities the way you want them to be represented when there may be multiple of this model document being represented by components within an assembly.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 12:23:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194687#M138585</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-26T12:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194718#M138587</link>
      <description>&lt;P&gt;Actually that reminds me of something else that might work.&amp;nbsp; If that one column in your BOM labeled "TOTAL_SQ_INCH" is representing a custom iProperty that was automatically created because of setting a parameter to be exported, then we may need to access the related parameter in that model file directly, instead of the custom iProperty.&amp;nbsp; When we set or change the value of that parameter, then that will automatically change the value of the related custom iProperty to match it, which will update the BOM.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 12:40:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194718#M138587</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-26T12:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194900#M138605</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, thank you for this information, according to this information i am able to get what i want in part list of drawing file without any code just manipulations of the names, but not in the BOM (assembly file) because the code doesn't work yet...&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1072317iEB5DDD48AE43A0EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 800px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1072318i962EDC5B9E9F63C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 13:43:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194900#M138605</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-26T13:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194956#M138607</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, i understand now your code is generating custom iproperty for the parts named '' TOTAL_SQ_INCH''&amp;nbsp; as type ''text'' and it's empty. but all the parts already have custom iproperty&amp;nbsp; named ''TOTAL_SQ_INCH'' as type '' number'' and value = zero (0). Can you use this information to update your code, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 14:02:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194956#M138607</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-26T14:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194985#M138609</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, in this image you see how inventor automatically multiply unit qty and item qty and give output as QTY , Can we write this kind of code for our problem ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1072341i15359980EA90B25D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 14:11:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11194985#M138609</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-26T14:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11195328#M138623</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;.&amp;nbsp; I'm glad that you got the document level quantity information set-up correctly now, and that it is now showing proper value for quantity in the BOM.&amp;nbsp; I still do not understand why my code would be creating text type custom iProperties in your parts with an empty value, if the part already contained a custom iProperty with the same exact name that was set to a numerical value of zero.&amp;nbsp; The code is supposed to be checking for the existence of that custom iProperty by its name first, and if found, set its value to the calculated value gathered within the code.&amp;nbsp; Then if it is not found, it is set to create it with that exact name, but with the numerical value we gathered within the code.&amp;nbsp; Both of the variables I am using within the code (oArea &amp;amp; oTotalArea) are both defined as Double, not String.&amp;nbsp; The value of the oArea variable was pulled in from the custom iProperty called "SQ_INCH", so if the value of that custom iProperty was a String instead, that may have cause a problem.&amp;nbsp; I only checked if its value was zero, and if so, told it to skip to the next BOM row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyways, here is another attempt at the iLogic code for populating the value of that custom iProperty named "&lt;SPAN&gt;TOTAL_SQ_INCH" with the value of the Unit Quantity x Item Quantity.&amp;nbsp; The Unit Quantity always returns a String, so I just have to check to see if it equals "Each", then if not, we have to attempt to extract just the numerical part of that String, so that we can multiply by it.&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then
		MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
		Exit Sub
	End If
	Dim oADoc As AssemblyDocument = ThisDoc.Document
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oBOM As BOM = oADef.BOM
	oBOM.PartsOnlyViewEnabled = True
	oBOM.StructuredViewEnabled = True
	oBOM.StructuredViewFirstLevelOnly = False
	Dim oStructuredView As BOMView = oBOM.BOMViews.Item("Structured")
	MultiplyBOMColumnValues(oStructuredView.BOMRows)
	'these edits were done in the documents, so they should also affect the Parts Only view
	'Dim oPartsOnlyView As BOMView = oBOM.BOMViews.Item("Parts Only")
	'MultiplyBOMColumnValues(oPartsOnlyView.BOMRows)
	oADoc.Update
End Sub

Sub MultiplyBOMColumnValues(oBOMRows As BOMRowsEnumerator)
	For Each oRow As BOMRow In oBOMRows
		Dim oRowDoc As Document = Nothing
		Dim oCD As ComponentDefinition  = oRow.ComponentDefinitions.Item(1)
		Try
			oRowDoc = oCD.Document
		Catch oEx As Exception
			MsgBox("Failed to get Document from BOMRow Item Number " &amp;amp; oRow.ItemNumber, vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		If IsNothing(oBOMRowDoc) Then Continue For
		Dim oCProps As PropertySet = oBOMRowDoc.PropertySets.Item("Inventor User Defined Properties")
		'UnitQuantity is derived from BaseUnits &amp;amp; BaseQuantity
		Dim oUnitQty As String = oCD.BOMQuantity.UnitQuantity
		Dim oItemQty As Integer = oRow.ItemQuantity
		Dim oTotalSqInches As Double = 0.0
		'if oUnitQty is set to "Each", this will either fail, or result in wrong result
		'can't multiply a String by an Integer, so attempting to extract number from String
		If oUnitQty = "Each" Then Continue For 'skip to next BOMRow
		Try
			oTotalSqInches = (Val(oUnitQty) * oItemQty)
		Catch
			MsgBox("Multiplying Unit Quantity x Item Quantity Failed!", vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		Dim oTotalSQInchProp As Inventor.Property = Nothing
		Try
			oTotalSQInchProp = oCProps.Item("TOTAL_SQ_INCH")
			oTotalSQInchProp.Value = oTotalSqInches
		Catch
			MsgBox("A custom iProperty named 'TOTAL_SQ_INCH' was not found in" &amp;amp; vbCrLf &amp;amp; _
			"the document associated with BOMRow Item Number " &amp;amp; oRow.ItemNumber &amp;amp; vbCrLf &amp;amp; _
			"So the rule will attempt to create it.", vbExclamation, "")
			oTotalSQInchProp = oCProps.Add(oTotalSqInches, "TOTAL_SQ_INCH")
		End Try
		If Not oRow.ChildRows Is Nothing Then
			MultiplyBOMColumnValues(oRow.ChildRows)
		End If
	Next
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 16:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11195328#M138623</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-26T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11195377#M138626</link>
      <description>&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@3E5F6F5F61A59A319E954F4832B72305/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, still it didn't give any output and there is no error as well.&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@4FD00EB5A135FD0F3D3FEE04D32CAC5C/emoticons/1f625.png" alt=":sad_but_relieved_face:" title=":sad_but_relieved_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@0E1C4C6A4039F60968930B2D80BE7018/emoticons/1f603.png" alt=":grinning_face_with_big_eyes:" title=":grinning_face_with_big_eyes:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 16:43:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11195377#M138626</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-26T16:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11205445#M138771</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, I tried to do some variations in the program but it still doesn't work, Can you please give it a another try? and I also found that Item qty is read only property so that may be causing the problem !&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:30:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11205445#M138771</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2022-05-31T16:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11205567#M138772</link>
      <description>&lt;P&gt;Apparently in the last code I posted, I was using 2 different variables to represent the BOMRow's document, by mistake (oBOMRowDoc &amp;amp; oRowDoc).&amp;nbsp; That was likely the main problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you now have the Item Quantity and the Unit Quantity set up properly, and seem to be getting the proper value in the regular Quantity column, it looks like you just need the value shown in that Quantity column to be copied over to the TOTAL_SQ_INCH column.&amp;nbsp; However, there does not appear to be a Property of the BOMRow object for that value shown in the "QTY" column, so we have to get it the hard way...by attempting to multiply the Unit Quantity (which is returned as a String) by the Item Quantity (which is an Integer representing number of components).&amp;nbsp; Since you can not multiply a String by an Integer, I am using the &lt;A href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.conversion.val?view=net-6.0#microsoft-visualbasic-conversion-val(system-string)" target="_blank" rel="noopener"&gt;Val&lt;/A&gt;() method in an attempt to extract the Double value from the String, within the multiplication line.&amp;nbsp; Then I attempt to find the custom iProperty named "TOTAL_SQ_INCH".&amp;nbsp; If that is not found, instead of automatically attempting to create it, I changed the code to let the user know about it with a message, then skip to the next BOM row.&amp;nbsp; If that custom iProperty is found, the code now attempts to find a matching Parameter.&amp;nbsp; (I was not sure if you had one or not, or if it was set to exposed/exported.)&amp;nbsp; If it finds that parameter, it will attempt to update its value, which would also automatically update the associated custom iProperty (won't work in the other direction).&amp;nbsp; If the iProperty was found, but the parameter was not found, it then just attempts to update the value of the custom iProperty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this version works for you now.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then
		MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
		Exit Sub
	End If
	Dim oADoc As AssemblyDocument = ThisDoc.Document
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oBOM As BOM = oADef.BOM
	oBOM.PartsOnlyViewEnabled = True
	oBOM.StructuredViewEnabled = True
	oBOM.StructuredViewFirstLevelOnly = False
	Dim oStructuredView As BOMView = oBOM.BOMViews.Item("Structured")
	MultiplyBOMColumnValues(oStructuredView.BOMRows)
	oADoc.Update
End Sub

Sub MultiplyBOMColumnValues(oBOMRows As BOMRowsEnumerator)
	For Each oRow As BOMRow In oBOMRows
		If Not oRow.ChildRows Is Nothing Then
			MultiplyBOMColumnValues(oRow.ChildRows)
		End If
		Dim oRowDoc As Document = Nothing
		Dim oCD As ComponentDefinition = oRow.ComponentDefinitions.Item(1)
		Try
			oRowDoc = oCD.Document
		Catch oEx As Exception
			MsgBox("Failed to get Document from BOMRow Item Number " &amp;amp; oRow.ItemNumber, vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		If IsNothing(oRowDoc) Then Continue For
		Dim oCProps As PropertySet = oRowDoc.PropertySets.Item("Inventor User Defined Properties")
		'UnitQuantity is derived from BaseUnits &amp;amp; BaseQuantity
		Dim oUnitQty As String = oCD.BOMQuantity.UnitQuantity
		Dim oItemQty As Integer = oRow.ItemQuantity
		'can not access value in "QTY" column directly...no BOMRow property for it
		Dim oTotalSqInches As Double = 0.0
		'if oUnitQty is set to "Each", this will either fail, or result in wrong result
		'can't multiply a String by an Integer, so attempting to extract number from String
		If oUnitQty = "Each" Then Continue For 'skip to next BOMRow
		Try
			oTotalSqInches = (Val(oUnitQty) * oItemQty)
		Catch
			MsgBox("Multiplying Unit Quantity x Item Quantity Failed!", vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		Dim oTotalSQInchProp As Inventor.Property = Nothing
		Try
			oTotalSQInchProp = oCProps.Item("TOTAL_SQ_INCH")
		Catch
			MsgBox("A custom iProperty named 'TOTAL_SQ_INCH' was not found in" &amp;amp; vbCrLf &amp;amp; _
			"the document associated with BOMRow Item Number " &amp;amp; oRow.ItemNumber, vbExclamation, "")
			Continue For 'skip to next BOMRow
		End Try
		If Not IsNothing(oTotalSQInchProp) Then 'if the iProperty was found...
			'check if there is a matching Parameter, if so, edit its value instead of the iProperty
			Dim oParams As Inventor.Parameters = oRowDoc.ComponentDefinition.Parameters
			Dim oParam As Inventor.Parameter = Nothing
			Try
				oParam = oParams.Item("TOTAL_SQ_INCH")
			Catch 'it was not found, so do nothing
			End Try
			If IsNothing(oParam) Then 'param not found, so edit iProperty value
				oTotalSQInchProp.Value = oTotalSqInches
			Else 'the parameter was found, so update its value/expession
				oParam.Expression = oTotalSqInches.ToString
				'which should also update the matching iProperty's value, if it is set to exported/exposed
			End If
		End If
	Next
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 May 2022 17:35:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11205567#M138772</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-31T17:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parts variables and assembly variable multiplication in BOM</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11209136#M138853</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;&amp;nbsp;- just curious if you read my reply to your initial request over here:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/bom-assembly-columns-multiplication/m-p/11206517/highlight/true#M138840" target="_blank"&gt;Re: BOM (Assembly) columns multiplication - Autodesk Community - Inventor&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 23:18:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/parts-variables-and-assembly-variable-multiplication-in-bom/m-p/11209136#M138853</guid>
      <dc:creator>pcrawley</dc:creator>
      <dc:date>2022-06-01T23:18:40Z</dc:date>
    </item>
  </channel>
</rss>

