<?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 automatically in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9604016#M61559</link>
    <description>&lt;P&gt;Here's some updated code including a simple numbered naming system&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"Hole Name Here"&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNewHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;
&lt;BR /&gt;        'Divide by 2.54 to convert cm to in
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oName&lt;/SPAN&gt;) &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;HoleDiameter&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt; / 2.54 = .25
			
			&lt;SPAN&gt;oCount&lt;/SPAN&gt; += 1
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;oNewHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"_"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oCount&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;It seems the easiest way to make it automatic is to use Inventors built in events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to Manage and Event Triggers&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-06-26 103504.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/788769i7F775B6B027A1BEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-06-26 103504.png" alt="Annotation 2020-06-26 103504.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drag the rule with the hole code under the Part Geometry Change. This will make the rule run anytime part geometry changes which includes creating holes. It's pretty lightweight, so it shouldn't cause any slowdowns if you leave it on, but you can always turn it on/off as needed&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="Annotation 2020-06-26 103717.png" style="width: 458px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/788770i61F006BC32BFC04C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-06-26 103717.png" alt="Annotation 2020-06-26 103717.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jun 2020 15:48:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-06-26T15:48:18Z</dc:date>
    <item>
      <title>Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9602716#M61555</link>
      <description>&lt;P&gt;If you make a hole when working on a part, the hole 1 will be displayed on the left searcher.&lt;BR /&gt;I want to make the name displayed in the searcher automatically change to M3 instead of hole 1 when a size 3 hole is made.&lt;BR /&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 01:11:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9602716#M61555</guid>
      <dc:creator>이슬이</dc:creator>
      <dc:date>2020-06-26T01:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603138#M61556</link>
      <description>&lt;P&gt;Did you know you can show extended information about&amp;nbsp;features in the model tree? It works on all features, not on individual ones (aka holes only). The setting can be found&amp;nbsp;here: Tools &amp;gt; Application Options &amp;gt; Part &amp;gt; Display extended information after feature node name in browser (this is a check box)&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:25:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603138#M61556</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2020-06-26T08:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603164#M61557</link>
      <description>&lt;P&gt;I know how. I want the name to change automatically.&lt;BR /&gt;Is there no way?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:42:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603164#M61557</guid>
      <dc:creator>이슬이</dc:creator>
      <dc:date>2020-06-26T08:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603922#M61558</link>
      <description>&lt;P&gt;You can use this to rename holes based on their diameters, but you'll have to run the rule manually. I'm trying to make it automatic though, if I do I will post it here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will need some sort of numbered naming system because multiple holes can't have the same name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'Divide by 2.54 to convert cm to in&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;HoleDiameter&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;/2.54 = 3 &lt;SPAN&gt;Then&lt;/SPAN&gt;
		
		&lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;"Hole Name Here"&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;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 15:19:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9603922#M61558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-26T15:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9604016#M61559</link>
      <description>&lt;P&gt;Here's some updated code including a simple numbered naming system&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"Hole Name Here"&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNewHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;
&lt;BR /&gt;        'Divide by 2.54 to convert cm to in
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oName&lt;/SPAN&gt;) &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;HoleDiameter&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt; / 2.54 = .25
			
			&lt;SPAN&gt;oCount&lt;/SPAN&gt; += 1
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;oNewHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"_"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oCount&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;It seems the easiest way to make it automatic is to use Inventors built in events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to Manage and Event Triggers&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-06-26 103504.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/788769i7F775B6B027A1BEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-06-26 103504.png" alt="Annotation 2020-06-26 103504.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drag the rule with the hole code under the Part Geometry Change. This will make the rule run anytime part geometry changes which includes creating holes. It's pretty lightweight, so it shouldn't cause any slowdowns if you leave it on, but you can always turn it on/off as needed&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="Annotation 2020-06-26 103717.png" style="width: 458px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/788770i61F006BC32BFC04C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-06-26 103717.png" alt="Annotation 2020-06-26 103717.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 15:48:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9604016#M61559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-26T15:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607165#M61560</link>
      <description>&lt;P&gt;Thank you for answer.&lt;/P&gt;&lt;P&gt;However, in the second coding, the following error occurs.&lt;/P&gt;&lt;P&gt;The parameters are wrong. (Exception occurred HRESULT: 0x80070057 (E_INVALIDARG))&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 08:56:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607165#M61560</guid>
      <dc:creator>이슬이</dc:creator>
      <dc:date>2020-06-29T08:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607656#M61561</link>
      <description>&lt;P&gt;Try this. I added some additional checks to prevent errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"Hole Name Here"&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNewHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDiam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Decimal&lt;/SPAN&gt; = .25 &lt;SPAN&gt;'Desired diameter in inches&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; = 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	 &lt;SPAN&gt;oNewHole&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleFeature&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;HoleFeatures&lt;/SPAN&gt;

        &lt;SPAN&gt;'Divide by 2.54 to convert cm to in&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;.&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;oName&lt;/SPAN&gt;) &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;oHole&lt;/SPAN&gt;.&lt;SPAN&gt;HoleDiameter&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt; / 2.54 = &lt;SPAN&gt;oDiam&lt;/SPAN&gt;
			
			&lt;SPAN&gt;oCount&lt;/SPAN&gt; += 1
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oNewHole&lt;/SPAN&gt; &lt;SPAN&gt;IsNot&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;

	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oNewHole&lt;/SPAN&gt;.&lt;SPAN&gt;HoleDiameter&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt; / 2.54 = &lt;SPAN&gt;oDiam&lt;/SPAN&gt;
		
		&lt;SPAN&gt;oNewHole&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"_"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oCount&lt;/SPAN&gt;
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jun 2020 12:49:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607656#M61561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-29T12:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607683#M61562</link>
      <description>&lt;P&gt;Perhaps something like this would work better for you?&lt;/P&gt;&lt;P&gt;It uses the ExtendedName portion of the feature's name (without the () marks at both ends, then just adds its item index number as an Integer at the end of the name, to ensure the name is unique each time.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oHoles As HoleFeatures = oPDef.Features.HoleFeatures
For i As Integer = 1 To oHoles.Count
	oHoles(i).Name = Mid(oHoles(i).ExtendedName,2,Len(oHoles(i).ExtendedName)-2) &amp;amp; " " &amp;amp; i
Next&lt;/LI-CODE&gt;&lt;P&gt;In case that ExtentedName info isn't what you want, there are also a couple other routes that you may like.&amp;nbsp; For instance if you check the holes's "IsClearanceHole" Boolean and its "Tapped" Boolean,&amp;nbsp; and if either is true, you can use one or more of its "ClearanceInfo" properties in the name, or some of the properties under"TapInfo" object (which would need to be defined as a "HoleTapInfo" object, before use) to use in the name.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 13:02:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9607683#M61562</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-06-29T13:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9608040#M61563</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9225801"&gt;@이슬이&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example of one possible variation of my other suggestion:&lt;/P&gt;&lt;P&gt;If the hole is a clearance hole, it uses the fastener size in the name of the hole feature.&lt;/P&gt;&lt;P&gt;If the hole is threaded, it uses the nominal size in the name of the hole feature.&lt;/P&gt;&lt;P&gt;If neither of the above checks were true, it does something similar to my first suggestion, but goes one step further to eliminate the trailing info after the hole diameter in the extended name info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oHoles As HoleFeatures = oPDef.Features.HoleFeatures
Dim oSimple As Boolean = True
Dim oHCI As HoleClearanceInfo
Dim oHTI As HoleTapInfo
Dim oExtName As String 'Extended Name

For i As Integer = 1 To oHoles.Count
	If oHoles(i).IsClearanceHole Then
		oHCI = oHoles(i).ClearanceInfo
		MsgBox("Fastener Size = " &amp;amp; oHCI.FastenerSize)
		oHoles(i).Name = oHCI.FastenerSize &amp;amp; " :" &amp;amp; i
		oSimple = False
	ElseIf oHoles(i).Tapped Then
		oHTI = oHoles(i).TapInfo
		MsgBox("Nominal Size = " &amp;amp; oHTI.NominalSize)
		oHoles(i).Name = oHTI.NominalSize &amp;amp; " :" &amp;amp; i
		oSimple = False
	End If
	If oSimple = True Then
		oExtName = Mid(oHoles(i).ExtendedName, 2, Len(oHoles(i).ExtendedName) -2)
		oHoles(i).Name = Split(oExtName," ")(0) &amp;amp; " :" &amp;amp; i
	End If
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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 style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE" &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;Also, when you have time, please review &amp;amp; vote for these 'Ideas' I'd like to get implemented.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add more capabilities to the 'Customize' dialog box (exe. Add Tab &amp;amp; Add Panel) &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/add-more-capabilities-to-the-customize-dialog-box-exe-add-tab/idi-p/9371747/" target="_blank" rel="noopener"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Constrain &amp;amp; Dimension Images In Assembly Sketches &amp;amp; Drawing Sketches (TitleBlocks &amp;amp; SketchedSymbols) &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/we-need-the-ability-to-fully-constrain-amp-dimension-images/idi-p/9299088/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Save Section View Status In DesignViewRepresentation (So It Can Be Used In The Drawing) &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/save-section-view-status-in-designviewrepresentation-so-is/idi-p/9270962/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Add SolidBodies Folder In iLogic Rule Editor Model Tab &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/ilogic-rule-editor-gt-model-tab-add-a-solid-bodies-folder-for/idi-p/9270898/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Convert All Views To Raster Before Autosave Stores To 'OldVersions' Folder &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/drawings-in-oldversions-set-all-views-to-raster-before-autosave/idi-p/9185521/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;SetDesignViewRepresentation - Fix limitations for DrawingView of a Part &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/setdesignviewrepresentation-fix-limitations-for-drawingview-of-a/idi-p/9369920/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Create DocumentSubTypeEnum &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/create-enum-for-documentsubtype-amp-or-document-subtype/idi-p/9402300/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Add kRevisionTag or kDrawingRevisionTag to ObjectTypeEnum &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/add-krevisiontag-or-kdrawingrevisiontag-to-objecttypeenum-ilogic/idi-p/9507606/" target=" Blank"&gt;Click Here &lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2020/ENU/" target="_blank"&gt;Inventor 2020 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 15:28:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9608040#M61563</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-06-29T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rename automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9609288#M61564</link>
      <description>&lt;P&gt;Thank you! Thanks a lot.&lt;/P&gt;&lt;P&gt;I have given you various methods, but this method does not cause an error and shows the desired result.&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 06:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rename-automatically/m-p/9609288#M61564</guid>
      <dc:creator>이슬이</dc:creator>
      <dc:date>2020-06-30T06:22:00Z</dc:date>
    </item>
  </channel>
</rss>

