<?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: Automatic setting filename to partnumber in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/13923745#M404275</link>
    <description>&lt;P&gt;Good day. If you have not resolved your problem in this regard: I have a piece of iLogic code that can help with this.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Nov 2025 10:06:11 GMT</pubDate>
    <dc:creator>RudolfVanDerSpuy</dc:creator>
    <dc:date>2025-11-28T10:06:11Z</dc:date>
    <item>
      <title>Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819654#M293810</link>
      <description>&lt;P&gt;&lt;SPAN&gt;At work we are using a system to name our part as p.e. ABGO_100 where the ABGO stands for the project. Now I want to find a way to link the filename to the partnumber (because I often use ctrl-c and ctrl-v and then rename in explorer to generate more parts. And it's also in de library parts that I use. Is there a way to do as shown in my example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First part: save as ABGO_100.ipt partnumber automatic ABGO_100&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In explorer ctrl-c ctrl-v: ABGO_100 copy.ipt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rename: ABGO_101.ipt partnumber automatic ABGO_101&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would save me (and the company ofcourse) a lot of time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Beli&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 15:08:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819654#M293810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-20T15:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819707#M293811</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand your requirements and assuming you don't use Vault.&amp;nbsp; Use the &lt;A href="http://www.inventortales.com/2012/11/renaming-files-in-autodesk-inventors.html" target="_blank"&gt;Inventor Design Assistant&lt;/A&gt; to rename your files as needed and/or to update part numbers.&amp;nbsp; Part numbers can also be updated through the Assembly BOM interface.&amp;nbsp; As a side note, the design assistant is not really user friendly so be patience with it..&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 15:27:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819707#M293811</guid>
      <dc:creator>Mark.Lancaster</dc:creator>
      <dc:date>2017-01-20T15:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819843#M293812</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;I'm not a great fan of Design assistant, so in most of case, I copy and paste parts or assembly inside Inventor.&lt;/P&gt;
&lt;P&gt;Then I use the "save and replace" command to quickly copy some design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your wish is to always have the part number equal to the filename you could run this kind rule in your top level assembly. This rule will set ALL sub files part number equal to the related file name. So at the end of your copy and paste task, you could run it only one time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Check if it is an assembly&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Show&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;This is NOT an assembly document !&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;OK&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;Return&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Create variables&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;PartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FNamePos&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Long&lt;/SPAN&gt;
&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;set a reference to the assembly component definintion&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&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;Inventor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;asmDef&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Prevent message&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;This will update the part number equal to file name in all sub files&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;_&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;vbNewLine&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Do you wish to Continue ?&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;vbYesNo&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;vbQuestion&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;vbNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Store referenced documents properties&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
    &lt;SPAN&gt;FullFileName&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;With extension&lt;/SPAN&gt;
    &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Find last "\" position in full filename path string   &lt;/SPAN&gt;
    &lt;SPAN&gt;FNamePos&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;InStrRev&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Extract FileName &lt;/SPAN&gt;
    &lt;SPAN&gt;FileName&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Mid&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FNamePos&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Len&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt; &lt;SPAN&gt;FNamePos&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;PartNumber&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Left&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Len&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt; &lt;SPAN&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Without extension&lt;/SPAN&gt;
    &lt;SPAN&gt;iProperties&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Project&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Part number&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;PartNumber&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also have an external rule, set with an event trigger to each of your parts, but I think it will be less friendly to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 16:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6819843#M293812</guid>
      <dc:creator>ThomasB44</dc:creator>
      <dc:date>2017-01-20T16:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6826453#M293813</link>
      <description>&lt;P&gt;not completely what I was looking for but tested this method and I'm going to use it. Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 09:02:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/6826453#M293813</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T09:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9162493#M293814</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;not completely what I was looking for but tested this method and I'm going to use it. Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;'SAVE COPY AS' Would do both at once since UNFORTUNATELY, Part Number=File Name upon creation... which i still find insanely frustrating and pointless.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 18:35:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9162493#M293814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-22T18:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9162562#M293815</link>
      <description>&lt;P&gt;From a top level assembly, you could write a bit of code to (if i understand correctly):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select part from assembly&lt;/P&gt;&lt;P&gt;open invisible&lt;/P&gt;&lt;P&gt;get part number&lt;/P&gt;&lt;P&gt;change from ABCD_100 to ABCD_101&lt;/P&gt;&lt;P&gt;save as new part number (automatically updating the Part number field)&lt;/P&gt;&lt;P&gt;optionally add new part into assembly&lt;/P&gt;&lt;P&gt;if thats what you need, i can write up a bit of code for that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 19:21:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9162562#M293815</guid>
      <dc:creator>NachoShaw</dc:creator>
      <dc:date>2019-11-22T19:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9767756#M293816</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3343209"&gt;@ThomasB44&lt;/a&gt;&amp;nbsp; Thank you very much, that is what i am looking for.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 07:49:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/9767756#M293816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-25T07:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11575874#M293817</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do the opposite? Change the file name to be equal to the part number?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 14:56:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11575874#M293817</guid>
      <dc:creator>geralJD3XV</dc:creator>
      <dc:date>2022-11-24T14:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11575951#M293818</link>
      <description>&lt;P&gt;The original code has allready found the filename so make it equal to the partnumber.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An easier method to get the filename is using the system.IO functions see source documentation &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.io.path.getfilenamewithoutextension?view=net-7.0#system-io-path-getfilenamewithoutextension(system-readonlyspan((system-char)))" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim FileName as String = System.IO.GetFileNameWithoutExtension (oDoc.FullFileName)
iProperties.Value(FileName, "Project", "Part number") = FileName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 15:34:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11575951#M293818</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-11-24T15:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11577389#M293819</link>
      <description>&lt;P&gt;Thank you for the help. I tried what you said but it didn´t work.&lt;/P&gt;&lt;P&gt;Can you help me figure out what i am doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Check if it is an assembly&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Show&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;This is NOT an assembly document !&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;OK&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;Return&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Create variables&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;PartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FNamePos&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Long&lt;/SPAN&gt;
&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;set a reference to the assembly component definintion&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&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;Inventor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;asmDef&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Prevent message&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;This will update the part number equal to file name in all sub files&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;_&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;vbNewLine&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Do you wish to Continue ?&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;vbYesNo&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;vbQuestion&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;vbNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Store referenced documents properties&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;asmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
    &lt;SPAN&gt;FullFileName&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;With extension&lt;/SPAN&gt;
    &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Find last "\" position in full filename path string   &lt;/SPAN&gt;
    &lt;SPAN&gt;FNamePos&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;InStrRev&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Extract FileName &lt;/SPAN&gt;
    &lt;SPAN&gt;FileName&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;PartNumber&lt;/SPAN&gt;
   
    &lt;SPAN&gt;iProperties&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FileName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Project&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Part number&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;FileName&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 09:29:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11577389#M293819</guid>
      <dc:creator>geralJD3XV</dc:creator>
      <dc:date>2022-11-25T09:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11578036#M293820</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10323761"&gt;@geralJD3XV&lt;/a&gt;&amp;nbsp;@Sorry I had a brain freeze yesterday. Changing the filename to be the part number is a much bigger task depending if you have subassemblies and parts in your assembly. You will need to perform a save as/replace file references. I suggest posting this as a separate post as it is a separate topic than the original and it will be complicated. &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/help-regarding-renaming-assembly-file-and-a-part-file-in-it-and/td-p/9886185" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is a working post that is renaming the files by creating a brand new set of files using save as then for the reference documents performing a replace reference. Exactly how you would do this manually. The only tweak you will need is to change the filename to be the partnumber of the file before it is saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 15:22:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11578036#M293820</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-11-25T15:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11629618#M293821</link>
      <description>&lt;P&gt;Hi there:&lt;/P&gt;&lt;P&gt;I have exactly the same problem.&amp;nbsp; I also tried to restructure the ilogic&amp;nbsp; code and arrived at the exact same point and it does not work. The fact that one can use Design Assistant to do the renaming , by copying the part number and naming the file name accordingly means that there are no obvious conflicts. It is however the typical pain in the neck job using DA and I am sure that ilogic can resolve the issue. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp; suggested a new post.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10323761"&gt;@geralJD3XV&lt;/a&gt;&amp;nbsp; Have you had any joy?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 13:47:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/11629618#M293821</guid>
      <dc:creator>RudolfVanDerSpuy</dc:creator>
      <dc:date>2022-12-19T13:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic setting filename to partnumber</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/13923745#M404275</link>
      <description>&lt;P&gt;Good day. If you have not resolved your problem in this regard: I have a piece of iLogic code that can help with this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 10:06:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/automatic-setting-filename-to-partnumber/m-p/13923745#M404275</guid>
      <dc:creator>RudolfVanDerSpuy</dc:creator>
      <dc:date>2025-11-28T10:06:11Z</dc:date>
    </item>
  </channel>
</rss>

