<?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: Add Custom Quantity iProperties (Assembly and Part) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209067#M36369</link>
    <description>&lt;P&gt;Thanks for the reply, but I see that this...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListRows&lt;/SPAN&gt;
	&lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(6).&lt;SPAN&gt;Value&lt;/SPAN&gt; = &lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;Value&lt;/SPAN&gt; * 2&lt;/PRE&gt;&lt;P&gt;has a value of x 2, sometimes I will have assemblies that I have to make 4 of, or sometimes only 1. If you've run the code I edited then you probably saw " Enter the Quantity" pop up. There is where I would enter the quantity I need, now that number has to be multiplied by the number of components in an assembly and thus be my Total_QTY in iproperties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will not need to add a custom iproperty to every part (expect to my older assembly drawings). I will add the custom iproperty to the ipt template. Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 22:31:57 GMT</pubDate>
    <dc:creator>hw.sheldon</dc:creator>
    <dc:date>2022-06-01T22:31:57Z</dc:date>
    <item>
      <title>Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11208949#M36367</link>
      <description>&lt;P&gt;Hello all. Again I am in the midst of editing a code, which I got of a forum (big THANKS to whoever wrote this). The purpose of this code is to add a custom iproperty for quantities on an assembly and assembly components. The main reason I want this is because I can add the quantities to the table on my dwg files with iproperties. I did get the assembly to work except I had to custom add the iproperty name myself (which I can do in the assembly template), so its no big deal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I have an assembly and and I need to produce a quantity of 2. As the screenshots show, the Unit_QTY is the number of components in an assembly. Let just say there's 4 in an assembly, so the Total_QTY should equal 8. My issue on this is how to get the Total_QTY on assembly components to the correct name and number. Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 21:07:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11208949#M36367</guid>
      <dc:creator>hw.sheldon</dc:creator>
      <dc:date>2022-06-01T21:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209020#M36368</link>
      <description>&lt;P&gt;You shouldn't need to create a custom iproperty for each part in the assembly if you just want to change a parts list value. Try something like this first:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsList&lt;/SPAN&gt;
&lt;SPAN&gt;oPartsList&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;.&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsListRow&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListRows&lt;/SPAN&gt;
	&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Expanded&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
	&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListColumns&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;PropertyTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kCustomProperty&lt;/SPAN&gt;, , &lt;SPAN&gt;"TOTAL QTY"&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListRows&lt;/SPAN&gt;
	&lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(6).&lt;SPAN&gt;Value&lt;/SPAN&gt; = &lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;Value&lt;/SPAN&gt; * 2
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 21:58:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209020#M36368</guid>
      <dc:creator>dalton98</dc:creator>
      <dc:date>2022-06-01T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209067#M36369</link>
      <description>&lt;P&gt;Thanks for the reply, but I see that this...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListRows&lt;/SPAN&gt;
	&lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(6).&lt;SPAN&gt;Value&lt;/SPAN&gt; = &lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(2).&lt;SPAN&gt;Value&lt;/SPAN&gt; * 2&lt;/PRE&gt;&lt;P&gt;has a value of x 2, sometimes I will have assemblies that I have to make 4 of, or sometimes only 1. If you've run the code I edited then you probably saw " Enter the Quantity" pop up. There is where I would enter the quantity I need, now that number has to be multiplied by the number of components in an assembly and thus be my Total_QTY in iproperties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will not need to add a custom iproperty to every part (expect to my older assembly drawings). I will add the custom iproperty to the ipt template. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 22:31:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209067#M36369</guid>
      <dc:creator>hw.sheldon</dc:creator>
      <dc:date>2022-06-01T22:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209946#M36370</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not a expert in iLogic or in english language... but as&amp;nbsp;I understand your description the code I am using should do exactly that and should help you to modify your code.&lt;/P&gt;&lt;P&gt;It also looks very similar to yours, I think we used the same starting code found in this forum&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/item-number-to-iproperty/m-p/8849986" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/item-number-to-iproperty/m-p/8849986&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enter number of pcs to produce, parameter "Product_quantity"&lt;/P&gt;&lt;P&gt;PART_QTY shows number of pcs of the part/assembly/subassembly, basically the same number that is in BOM&lt;/P&gt;&lt;P&gt;ORDER_QTY shows total number of pcs to produce for each part/assembly/subassembly. The formula is&amp;nbsp;ORDER_QTY = Product_quantity *&amp;nbsp;PART_QTY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 10:04:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11209946#M36370</guid>
      <dc:creator>Pav3L</dc:creator>
      <dc:date>2024-12-02T10:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210410#M36371</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11235947"&gt;@hw.sheldon&lt;/a&gt;&amp;nbsp;mb I didn't really read your code. The try/catch trick works for creating new custom iproperties.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAss&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCustomProp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PropertySet&lt;/SPAN&gt;
&lt;SPAN&gt;oCustomProp&lt;/SPAN&gt; = &lt;SPAN&gt;oAss&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(4)

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTotalQty&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;oTotalQty&lt;/SPAN&gt; = &lt;SPAN&gt;oAss&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt; = &lt;SPAN&gt;InputBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Enter the quantity."&lt;/SPAN&gt;, &lt;SPAN&gt;"Quantity"&lt;/SPAN&gt;, &lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;)

&lt;SPAN&gt;'create custom iproperty ^&lt;/SPAN&gt;
&lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;oCustomProp&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Unit_QTY"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt; = &lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
&lt;SPAN&gt;oCustomProp&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;, &lt;SPAN&gt;"Unit_QTY"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;'create total quantity property&lt;/SPAN&gt;
&lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;oCustomProp&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Total_QTY"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt; = &lt;SPAN&gt;oTotalQty&lt;/SPAN&gt; * &lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
&lt;SPAN&gt;oCustomProp&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oTotalQty&lt;/SPAN&gt; * &lt;SPAN&gt;ItemQuantity&lt;/SPAN&gt;, &lt;SPAN&gt;"Total_QTY"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jun 2022 12:57:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210410#M36371</guid>
      <dc:creator>dalton98</dc:creator>
      <dc:date>2022-06-02T12:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210503#M36372</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7983840"&gt;@Pav3L&lt;/a&gt;, this is exactly what I was looking for. Thanks much!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:23:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210503#M36372</guid>
      <dc:creator>hw.sheldon</dc:creator>
      <dc:date>2022-06-02T13:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210521#M36373</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11795854"&gt;@dalton98&lt;/a&gt;, your code does come very close but it shouldn't multiply the Total_QTY by that much. Also, the code only adds the iproperty to assembly and not the assembly components. Thanks for trying!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:28:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210521#M36373</guid>
      <dc:creator>hw.sheldon</dc:creator>
      <dc:date>2022-06-02T13:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210558#M36374</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11235947"&gt;@hw.sheldon&lt;/a&gt;&amp;nbsp;Glad you found a solution. However, I would be cautious when assigning assembly values (i.e. item quantity) to those specific part documents in case they are used on different assemblies.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11210558#M36374</guid>
      <dc:creator>dalton98</dc:creator>
      <dc:date>2022-06-02T13:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11211707#M36375</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The code is cut version of mine, I got the base code from the forum. I use the Project number to differentiate the parts/assemblies from one another, as I don't want re-used parts and assemblies to change the Total QTY upsetting all the drawings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your issue, however is easier solved in the drawing environment, where you can make use of the parts list multiplier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a look here and let me know if you need any help.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/drawing-parts-quantity-ilogic/m-p/7983980" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/drawing-parts-quantity-ilogic/m-p/7983980&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 23:51:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11211707#M36375</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2022-06-02T23:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add Custom Quantity iProperties (Assembly and Part)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11214013#M36376</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/371344"&gt;@rhasell&lt;/a&gt;&amp;nbsp;Thanks, I'll take a look at it.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 00:08:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-custom-quantity-iproperties-assembly-and-part/m-p/11214013#M36376</guid>
      <dc:creator>hw.sheldon</dc:creator>
      <dc:date>2022-06-04T00:08:41Z</dc:date>
    </item>
  </channel>
</rss>

