<?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 quickly rename parts and assemblies to new job number in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8480724#M80682</link>
    <description>&lt;P&gt;I am wondering if there is a way to quickly update our job numbers on details and assemblies when copying&lt;BR /&gt;them over to a new job. It takes a lot of time in Design Assistant. The details are usually similar but always different.&lt;BR /&gt;Checked out Design Cloner but I am wondering if there is an app or Ilogic program that could do a whole directory at once?&lt;BR /&gt;I am not good at Ilogic so how hard would this be to do?&lt;BR /&gt;Our job numbers on detail and assemblies are as follows:&lt;BR /&gt;1234 will be the number that changes.&lt;/P&gt;
&lt;P&gt;DETAILS---- J-1234-D05678_DETAIL NAME.IPT&lt;BR /&gt;DETAILS SUCH AS IN WELMENT COMPONENTS---- J-1234-D05678A_DETAIL NAME.IPT&lt;BR /&gt;SUB ASSEMBLIES---- J-1234-U05670_SUB ASSY NAME.IAM&lt;BR /&gt;MAIN ASSEMBLIES---- J-1234-L05670_MAIN ASS NAME.IAM&lt;/P&gt;</description>
    <pubDate>Thu, 20 Dec 2018 13:07:50 GMT</pubDate>
    <dc:creator>slphantom</dc:creator>
    <dc:date>2018-12-20T13:07:50Z</dc:date>
    <item>
      <title>quickly rename parts and assemblies to new job number</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8480724#M80682</link>
      <description>&lt;P&gt;I am wondering if there is a way to quickly update our job numbers on details and assemblies when copying&lt;BR /&gt;them over to a new job. It takes a lot of time in Design Assistant. The details are usually similar but always different.&lt;BR /&gt;Checked out Design Cloner but I am wondering if there is an app or Ilogic program that could do a whole directory at once?&lt;BR /&gt;I am not good at Ilogic so how hard would this be to do?&lt;BR /&gt;Our job numbers on detail and assemblies are as follows:&lt;BR /&gt;1234 will be the number that changes.&lt;/P&gt;
&lt;P&gt;DETAILS---- J-1234-D05678_DETAIL NAME.IPT&lt;BR /&gt;DETAILS SUCH AS IN WELMENT COMPONENTS---- J-1234-D05678A_DETAIL NAME.IPT&lt;BR /&gt;SUB ASSEMBLIES---- J-1234-U05670_SUB ASSY NAME.IAM&lt;BR /&gt;MAIN ASSEMBLIES---- J-1234-L05670_MAIN ASS NAME.IAM&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 13:07:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8480724#M80682</guid>
      <dc:creator>slphantom</dc:creator>
      <dc:date>2018-12-20T13:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: quickly rename parts and assemblies to new job number</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8481001#M80683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;if i understood that correctly. You want to replace specific&amp;nbsp;numbers in names of parts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MAIN ASSEMBLIES---- J-&lt;FONT color="#FF0000"&gt;1234&lt;/FONT&gt;-L05670_MAIN ASS NAME.IAM &lt;FONT color="#339966"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;FONT color="#000000"&gt;MAIN ASSEMBLIES---- J-&lt;FONT color="#FF0000"&gt;6789&lt;/FONT&gt;-L05670_MAIN ASS NAME.IAM&amp;nbsp; &lt;FONT color="#FF0000"&gt;???&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I think you answered yourself. &lt;U&gt;Design&lt;/U&gt; &lt;U&gt;cloner&lt;/U&gt;&amp;nbsp;&lt;SPAN&gt;can do that a whole directory at once.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Výstřižek.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/583630iB5A697D9F1A6DB1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Výstřižek.JPG" alt="Výstřižek.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 14:16:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8481001#M80683</guid>
      <dc:creator>firelinsgs</dc:creator>
      <dc:date>2018-12-20T14:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: quickly rename parts and assemblies to new job number</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8482113#M80684</link>
      <description>&lt;P&gt;highly detailed pseudo code (that means not tested or spell checked) I write in vb.net, but this should also work in iLogic, but VBA will need modifications:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public property invApp as inventor.application&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public sub copyInventorFilesFromDirectory(strDirectoryIn as string, strDirectoryOut as string)&lt;/P&gt;
&lt;P&gt;invapp = GetInventorApplication 'this my custom routine for vb.net, for ilogic you can use = thisapplication&lt;/P&gt;
&lt;P&gt;dim diOriginal as directoryInfo = new system.io.directoryinfo(&lt;SPAN&gt;strDirectoryIn &lt;/SPAN&gt;)&lt;/P&gt;
&lt;P&gt;dim diNew as directoryInfo = system.io.CreateDirectory(&lt;SPAN&gt;strDirectoryOut &lt;/SPAN&gt;)&lt;/P&gt;
&lt;P&gt;for each fi as fileinfo in dioriginal.enumeratefiles&lt;/P&gt;
&lt;P&gt;select case fi.extension&lt;/P&gt;
&lt;P&gt;case is "iam"&lt;/P&gt;
&lt;P&gt;copydoc(fi)&lt;/P&gt;
&lt;P&gt;case is "ipt"&lt;/P&gt;
&lt;P&gt;copydoc(fi)&lt;/P&gt;
&lt;P&gt;end select&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public function copydoc(fi, diNew) as inventor.document&lt;/P&gt;
&lt;P&gt;dim newFilename as string = getnewfilename(fi, diNew)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dim fiNew as new fileinfo = fi.copyto(diNew.fullname &amp;amp; "\" &amp;amp; newfilename)&lt;/P&gt;
&lt;P&gt;dim &lt;SPAN&gt;invDoc&lt;/SPAN&gt; as inventor.document =invapp.Documents.open(fiNew) '.OpenWithOptions has many more features to help&lt;/P&gt;
&lt;P&gt;control opening issues.&lt;/P&gt;
&lt;P&gt;Dim props As Inventor.PropertySet = invDoc.PropertySets.Item(Tools.DesignTrackingPropertySetID)&lt;BR /&gt;Dim prPartNumber As Inventor.Property = props.Item("Part Number")&lt;/P&gt;
&lt;P&gt;dim newPartNumber as string =&amp;nbsp; System.IO.Path.GetFileNameWithoutExtension(fiNew.Name)&lt;BR /&gt;prPartNumber.Value =&amp;nbsp;newPartNumber 'construct this from file name, or get filename from this&lt;/P&gt;
&lt;P&gt;invdoc.save&lt;/P&gt;
&lt;P&gt;return invDoc&lt;/P&gt;
&lt;P&gt;end function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public function GetNewFileName(fi, dinew)&lt;/P&gt;
&lt;P&gt;'do the work to convert the old file name to the new file name using the new directory path, then return as string value of full file path (drive:\folders\file.extension)&lt;/P&gt;
&lt;P&gt;return strNewFileName&lt;/P&gt;
&lt;P&gt;end function&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 21:33:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/quickly-rename-parts-and-assemblies-to-new-job-number/m-p/8482113#M80684</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2018-12-20T21:33:08Z</dc:date>
    </item>
  </channel>
</rss>

