<?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 Change size of parts from top level of assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12776743#M167397</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an assembly with 17 subassemblies. Each of these subassemblies is made up of parts from a custom content center.&lt;/P&gt;&lt;P&gt;I want to be able to change the size of parts based on Part Numbers from the top level of the assembly.&lt;/P&gt;&lt;P&gt;For example, if there is any instance of a part in all subassemblies with a Part Number of FTS14019, I want to change their size to another part from the same content center family with a Part Number of FTS9019.&lt;/P&gt;&lt;P&gt;What way would I approach this?&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 05:10:58 GMT</pubDate>
    <dc:creator>harland.jU5ZCW</dc:creator>
    <dc:date>2024-05-16T05:10:58Z</dc:date>
    <item>
      <title>Change size of parts from top level of assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12776743#M167397</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an assembly with 17 subassemblies. Each of these subassemblies is made up of parts from a custom content center.&lt;/P&gt;&lt;P&gt;I want to be able to change the size of parts based on Part Numbers from the top level of the assembly.&lt;/P&gt;&lt;P&gt;For example, if there is any instance of a part in all subassemblies with a Part Number of FTS14019, I want to change their size to another part from the same content center family with a Part Number of FTS9019.&lt;/P&gt;&lt;P&gt;What way would I approach this?&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 05:10:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12776743#M167397</guid>
      <dc:creator>harland.jU5ZCW</dc:creator>
      <dc:date>2024-05-16T05:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change size of parts from top level of assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778028#M167421</link>
      <description>&lt;P&gt;The easiest method would be to use the ilogic API and the capture tool n the editor.&amp;nbsp;&lt;BR /&gt;Go to your part in the ilogic model browser right click and component add. This will process the code needed to add this specific occurrence. Use this as a guide only as you might not want to add this part on its own.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In the ilogic snippet &amp;nbsp;browser you should find a function for content center replace of a component. This should allow you to replace one component for another and even allow multiple replacements within the sub assembly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Actually replacing all parts in all sub assemblies will be a little more difficult as you will need to dip into the Inventor API to start working with all the occurrence.&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ComponentOccurrence_Replace_Sample" target="_blank" rel="noopener"&gt;See VBA sample of replacing one part manually picked.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I would suggest to work first with the ilogic API and just get a replacement of one part to happen. Then work from there. Post any code your having difficulty with.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 14:34:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778028#M167421</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2024-05-16T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Change size of parts from top level of assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778093#M167431</link>
      <description>&lt;P&gt;This is not an easy job. It requires too much code and that's why I don't do it for you. But few suggestions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) For replacing components you can use&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-DC3308F1-3AAF-4106-A658-F27247A2725E" target="_blank"&gt;ComponentOccurrence.Replace Method&lt;/A&gt; which allows you to replace all occurrences at the one level. You need to call this on every sub-assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) How to obtain info about content center part. You can read some useful info from iProperties set:&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Content Library Component Properties {B9600981-DEE8-4547-8D7C-E525B3A1727A}&lt;/STRONG&gt;&lt;/EM&gt; where are information which allows you to identify the ContentFamily and&amp;nbsp;ContentRow. This is important when you look for content center source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) How to get&amp;nbsp;ContentFamily. You can use the method&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-D571B629-9646-4F12-846B-3AB3E76333AD" target="_blank"&gt;ContentCenter.GetContentObject Method&lt;/A&gt;. As the first argument you need to pass string which looks like &lt;EM&gt;&lt;STRONG&gt;"v3#&amp;lt;FamilyId&amp;gt;#"&lt;/STRONG&gt;&lt;/EM&gt; where&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;FamilyId&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt; is the value of&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;FamilyId&lt;/STRONG&gt;&lt;/EM&gt; iProperty from property set mentioned above. See ContentIdentifier property of ContentFamily. In this family you need to look for appropriate ContentRow with specified PartNumber.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;4) Ensure the content center model. Use&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-16189B90-6D1D-4077-8127-05A951AF22E2" target="_blank"&gt;ContentFamily.CreateMember Method&lt;/A&gt; to create/update appropriate model from content center. This method returns the file name of the model which can be used in replace method mentioned above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it helps.&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@2A0F083D272D63CF5E4A44A10756DF5D/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 14:56:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778093#M167431</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-05-16T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Change size of parts from top level of assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778482#M167436</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11797963"&gt;@harland.jU5ZCW&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a basic example done with 2023, see attached example files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;bSize&lt;/SPAN&gt; = &lt;SPAN&gt;InputRadioBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Prompt"&lt;/SPAN&gt;, &lt;SPAN&gt;"Short"&lt;/SPAN&gt;, &lt;SPAN&gt;"Long"&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;, &lt;SPAN&gt;Title&lt;/SPAN&gt; := &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;)

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;bSize&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;myBolt&lt;/SPAN&gt; = &lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddContentCenterPart&lt;/SPAN&gt;(&lt;SPAN&gt;"My Bolt"&lt;/SPAN&gt;, &lt;SPAN&gt;"Fasteners:Bolts:Countersunk"&lt;/SPAN&gt;, &lt;SPAN&gt;"AS 1427 - Metric"&lt;/SPAN&gt;, &lt;SPAN&gt;"M2 x 4"&lt;/SPAN&gt;, , &lt;SPAN&gt;grounded&lt;/SPAN&gt; := &lt;SPAN&gt;True&lt;/SPAN&gt;)
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;myBolt&lt;/SPAN&gt; = &lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddContentCenterPart&lt;/SPAN&gt;(&lt;SPAN&gt;"My Bolt"&lt;/SPAN&gt;, &lt;SPAN&gt;"Fasteners:Bolts:Countersunk"&lt;/SPAN&gt;, &lt;SPAN&gt;"AS 1427 - Metric"&lt;/SPAN&gt;, &lt;SPAN&gt;"M2 x 25"&lt;/SPAN&gt;, &lt;SPAN&gt;grounded&lt;/SPAN&gt; := &lt;SPAN&gt;True&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;if&lt;/SPAN&gt;
 &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easy way to get this code is to extract it:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;From within a rule in your assembly that has the CC part, right click on the part in the Model tab as shown and choose &lt;STRONG&gt;Capture Current State ( Components.Add)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Exit the rule and change the CC part size manually&lt;/LI&gt;
&lt;LI&gt;Back in the rule, extract the code using Capture Current State again&lt;/LI&gt;
&lt;LI&gt;Create the conditional logic to choose when to use each, etc&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curtis_Waguespack_0-1715880413853.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1363430i5E0CC38B85A5FDE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Curtis_Waguespack_0-1715880413853.png" alt="Curtis_Waguespack_0-1715880413853.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This example uses a grounded component, but one that uses constraints would be similar, but you would choose&amp;nbsp;C&lt;STRONG&gt;apture Current State ( Components Constraints.Add)&lt;/STRONG&gt; to extract the constraint code as well&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curtis_Waguespack_1-1715880614673.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1363432i56344065363FE412/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Curtis_Waguespack_1-1715880614673.png" alt="Curtis_Waguespack_1-1715880614673.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank" rel="noopener"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 17:32:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12778482#M167436</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2024-05-16T17:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change size of parts from top level of assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12779401#M167446</link>
      <description>&lt;P&gt;Thanks, sounds like a good spot to start!&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 03:23:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-size-of-parts-from-top-level-of-assembly/m-p/12779401#M167446</guid>
      <dc:creator>harland.jU5ZCW</dc:creator>
      <dc:date>2024-05-17T03:23:57Z</dc:date>
    </item>
  </channel>
</rss>

