<?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: Rename Part numbers into the Display names of parts in an assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681445#M165723</link>
    <description>&lt;P&gt;Hey, I've already got all the parts in the assembly so I just need to run the iLogic rule once. And the instance wouldn't be needed since the display file names are already set. The reason I don't need instance numbers is because I've got a lot of parts and the duplicates should have the same part number so I get a quantity in the BOM automatically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had found this post where some code was made to take the filename and make it the part name for every part in an assembly. this is very similar to I want but I just need to alter the code where instead of taking the Filename it takes the Display name and makes that the part number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/td-p/6819654" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/td-p/6819654&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 14:15:39 GMT</pubDate>
    <dc:creator>aflores9JTPA</dc:creator>
    <dc:date>2024-04-02T14:15:39Z</dc:date>
    <item>
      <title>Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681324#M165721</link>
      <description>&lt;P&gt;I'm wanting to take the Display names of parts and have those names be the part numbers for all the parts in my assembly. I've looked through other forums to try to see if I can bring some iLogic code together but I'm new to it and was unsuccessful. Any ideas on how to easily do this?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 13:23:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681324#M165721</guid>
      <dc:creator>aflores9JTPA</dc:creator>
      <dc:date>2024-04-02T13:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681413#M165722</link>
      <description>&lt;P&gt;Hi, I assume you mean the name plus the instance number?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Plate:1"&lt;BR /&gt;Yes I think iLogic would be the only way to do this, but you would need to run the code every time a new part was added.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 14:01:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681413#M165722</guid>
      <dc:creator>James_Willo</dc:creator>
      <dc:date>2024-04-02T14:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681445#M165723</link>
      <description>&lt;P&gt;Hey, I've already got all the parts in the assembly so I just need to run the iLogic rule once. And the instance wouldn't be needed since the display file names are already set. The reason I don't need instance numbers is because I've got a lot of parts and the duplicates should have the same part number so I get a quantity in the BOM automatically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had found this post where some code was made to take the filename and make it the part name for every part in an assembly. this is very similar to I want but I just need to alter the code where instead of taking the Filename it takes the Display name and makes that the part number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/td-p/6819654" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/td-p/6819654&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 14:15:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12681445#M165723</guid>
      <dc:creator>aflores9JTPA</dc:creator>
      <dc:date>2024-04-02T14:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12682265#M165739</link>
      <description>&lt;P&gt;There's 3 "Part Names", the file path (.ipt), occurrence (what you see in the model tree) &amp;amp; the part number (in iProperties).&amp;nbsp; &amp;nbsp;So you want to change the part number into what the occurrence is?&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="Preston_Reed_1-1712088222437.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1344878i32FAA8A6125CD33A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Preston_Reed_1-1712088222437.png" alt="Preston_Reed_1-1712088222437.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Preston_Reed_2-1712088277186.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1344879iE772347B74BF38D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Preston_Reed_2-1712088277186.png" alt="Preston_Reed_2-1712088277186.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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Preston_Reed_3-1712088366948.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1344880i7BEC589588FACD68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Preston_Reed_3-1712088366948.png" alt="Preston_Reed_3-1712088366948.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:11:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12682265#M165739</guid>
      <dc:creator>Preston_Reed</dc:creator>
      <dc:date>2024-04-02T20:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12682289#M165740</link>
      <description>&lt;P&gt;yes id want the part number to be what the occurrence is without the occurrence value at the end. Here is an example of some of the occurrence names I've got and I marked it with what values I don't want on the part number.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:27:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12682289#M165740</guid>
      <dc:creator>aflores9JTPA</dc:creator>
      <dc:date>2024-04-02T20:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Part numbers into the Display names of parts in an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12685664#M165799</link>
      <description>&lt;P&gt;here you go, i briefly tested it, it should be working ok.&amp;nbsp; Let me know if you have any issues&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;main&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropPartNumbers&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;iPropPartNumbers&lt;/SPAN&gt;
		
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
	&lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
	
&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;SPAN&gt; Sub Asm	&lt;/SPAN&gt;
	&lt;SPAN&gt;' Iterate through all Of the occurrences&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedOccurrences&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt;)  
		&lt;SPAN&gt;' Searching through the top level assembly file in order to locate only sub assembly files&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;DefinitionDocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; 
			&lt;SPAN&gt;comp&lt;/SPAN&gt; = &lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;InventorComponent&lt;/SPAN&gt;(&lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;CompStrng&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
            &lt;SPAN&gt;' Split the string using ":" as delimiter and get the first element&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;NewName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;CompStrng&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;":"&lt;/SPAN&gt;)(0)
					&lt;SPAN&gt;' Create iprop with PS Value&lt;/SPAN&gt;
					&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;) = &lt;SPAN&gt;NewName&lt;/SPAN&gt;
			
			&lt;SPAN&gt;' Write to component iprops&lt;/SPAN&gt;
			&lt;SPAN&gt;On&lt;/SPAN&gt; &lt;SPAN&gt;Error&lt;/SPAN&gt; &lt;SPAN&gt;Resume&lt;/SPAN&gt; &lt;SPAN&gt;Next&lt;/SPAN&gt; 
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;) = _
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt; 
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
	
&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;SPAN&gt; Piece Parts&lt;/SPAN&gt;
	&lt;SPAN&gt;' Iterate through all Of the occurrences&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedOccurrences&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt;)  
		&lt;SPAN&gt;' Searching through the top level assembly file in order to locate only sub assembly files&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;DefinitionDocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;kPartDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; 
			&lt;SPAN&gt;comp&lt;/SPAN&gt; = &lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;InventorComponent&lt;/SPAN&gt;(&lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;CompStrng&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
            &lt;SPAN&gt;' Split the string using ":" as delimiter and get the first element&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;NewName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;CompStrng&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;":"&lt;/SPAN&gt;)(0)
					&lt;SPAN&gt;' Create iprop with PS Value&lt;/SPAN&gt;
					&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;) = &lt;SPAN&gt;NewName&lt;/SPAN&gt;
			
			&lt;SPAN&gt;' Write to component iprops&lt;/SPAN&gt;
			&lt;SPAN&gt;On&lt;/SPAN&gt; &lt;SPAN&gt;Error&lt;/SPAN&gt; &lt;SPAN&gt;Resume&lt;/SPAN&gt; &lt;SPAN&gt;Next&lt;/SPAN&gt; 
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;oOccurrence&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;) = _
			&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt; 
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
	
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2024 03:34:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/rename-part-numbers-into-the-display-names-of-parts-in-an/m-p/12685664#M165799</guid>
      <dc:creator>Preston_Reed</dc:creator>
      <dc:date>2024-04-04T03:34:16Z</dc:date>
    </item>
  </channel>
</rss>

