<?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: Pack and go using ilogic save all documents in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10459695#M48127</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This rule is duplicating assemblies. Why not copying the folder instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jul 2021 13:50:51 GMT</pubDate>
    <dc:creator>FINET_Laurent</dc:creator>
    <dc:date>2021-07-11T13:50:51Z</dc:date>
    <item>
      <title>Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10456613#M48126</link>
      <description>&lt;P&gt;I'm using this code, but I would send the folder idw too. Because this code save as ipt and iam.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then&lt;BR /&gt;MsgBox("This rule '" &amp;amp; iLogicVb.RuleName &amp;amp; "' only works for Assembly Documents.",vbOK, "WRONG DOCUMENT TYPE")&lt;BR /&gt;Return&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;Dim oADoc As AssemblyDocument = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;Dim oFileDlg As Inventor.FileDialog = Nothing&lt;BR /&gt;ThisApplication.CreateFileDialog(oFileDlg)&lt;BR /&gt;oFileDlg.Filter = "Autodesk Inventor Assembly Files (*.iam)|*.iam"&lt;BR /&gt;oFileDlg.InitialDirectory = ThisApplication.DesignProjectManager.ActiveDesignProject.WorkspacePath&lt;BR /&gt;oFileDlg.FileName = ThisDoc.FileName(False)&lt;BR /&gt;oFileDlg.DialogTitle = "Specify New Name &amp;amp; Location For Copied Assembly"&lt;BR /&gt;oFileDlg.CancelError = True&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;BR /&gt;oFileDlg.ShowSave&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;MsgBox("No File Saved.", vbOKOnly, "DIALOG CANCELED")&lt;BR /&gt;ElseIf oFileDlg.FileName &amp;lt;&amp;gt; "" Then&lt;BR /&gt;oNewFileName = oFileDlg.FileName&lt;BR /&gt;oADoc.SaveAs(oNewFileName, False)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;oADoc = Nothing&lt;/P&gt;&lt;P&gt;InventorVb.DocumentUpdate()&lt;/P&gt;&lt;P&gt;oADoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;Dim oLast3Chars As String&lt;BR /&gt;For Each oRefDoc As Document In oADoc.AllReferencedDocuments&lt;BR /&gt;ThisApplication.Documents.Open(oRefDoc.FullFileName,False)&lt;BR /&gt;oLast3Chars = Left(Right(oRefDoc.FullFileName, 7), 3)&lt;BR /&gt;If oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then&lt;BR /&gt;Dim oRefPDoc As PartDocument = oRefDoc&lt;BR /&gt;Dim oRefPDef As PartComponentDefinition = oRefPDoc.ComponentDefinition&lt;BR /&gt;If oRefPDef.IsContentMember = False Then&lt;BR /&gt;oRefDoc.SaveAs(Left(oADoc.FullFileName, Len(oADoc.FullFileName) -4) &amp;amp; oLast3Chars &amp;amp; ".ipt", True)&lt;BR /&gt;End If&lt;BR /&gt;ElseIf oRefDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then&lt;BR /&gt;oRefDoc.SaveAs(Left(oADoc.FullFileName, Len(oADoc.FullFileName) -4) &amp;amp; oLast3Chars &amp;amp; ".iam", True)&lt;BR /&gt;End If&lt;BR /&gt;oRefDoc.Close&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;Dim oOccDoc As Document&lt;BR /&gt;Dim oOccNewFileName As String&lt;BR /&gt;For Each oOcc As ComponentOccurrence In oADoc.ComponentDefinition.Occurrences&lt;BR /&gt;oOccDoc = oOcc.Definition.Document&lt;BR /&gt;oLast3Chars = Left(Right(oOccDoc.FullFileName, 7), 3)&lt;BR /&gt;If oOccDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then&lt;BR /&gt;Dim oOccPDef As PartComponentDefinition = oOcc.Definition&lt;BR /&gt;If oOccPDef.IsContentMember = False Then&lt;BR /&gt;oOccNewFileName = Left(oADoc.FullFileName, Len(oADoc.FullFileName) -4) &amp;amp; oLast3Chars &amp;amp; ".ipt"&lt;BR /&gt;End If&lt;BR /&gt;ElseIf oOccDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then&lt;BR /&gt;oOccNewFileName = Left(oADoc.FullFileName,Len(oADoc.FullFileName)-4) &amp;amp; oLast3Chars &amp;amp; ".iam"&lt;BR /&gt;End If&lt;BR /&gt;oOcc.Replace(oOccNewFileName, True)&lt;BR /&gt;Next&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 18:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10456613#M48126</guid>
      <dc:creator>aronmatheus</dc:creator>
      <dc:date>2021-07-09T18:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10459695#M48127</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This rule is duplicating assemblies. Why not copying the folder instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 13:50:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10459695#M48127</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2021-07-11T13:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10459940#M48128</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;, because when I finish the project the I will change the name of the parts.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 17:02:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10459940#M48128</guid>
      <dc:creator>aronmatheus</dc:creator>
      <dc:date>2021-07-11T17:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10460195#M48129</link>
      <description>&lt;P&gt;Can you explain the workflow in more than one line please ? I'm not sure I understand.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 20:35:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10460195#M48129</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2021-07-11T20:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10461509#M48130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;&amp;nbsp;, I want to do the same in this picture because I'm using this macro. Now I would like to save the idw file too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-07-12 07_55_53-Greenshot.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/940175i895F1C5D27C08541/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-07-12 07_55_53-Greenshot.png" alt="2021-07-12 07_55_53-Greenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 11:02:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10461509#M48130</guid>
      <dc:creator>aronmatheus</dc:creator>
      <dc:date>2021-07-12T11:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10465398#M48131</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1871005"&gt;@aronmatheus&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a standalone function you could integrate in or alternatively just slot in the key snippets at the location you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might be nice to keep it separate as these can get confusing. You can remove the update iproperty command if not needed,“&lt;SPAN&gt;UpdateCopiedModeliPropertiesCmd“&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/ilogic-replace-reference-file-in-drawing-when-opened-invisible/td-p/9002368" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/ilogic-replace-reference-file-in-drawing-when-opened-invisible/td-p/9002368&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Function DrawingReplace(OldLoc As String, newname As String)
Dim OldName As String = Left(OldLoc, Len(OldLoc) -3) &amp;amp; "dwg"
Dim DrawDoc As DrawingDocument = ThisApplication.Documents.Open(OldName, &lt;FONT color="#FF0000"&gt;False&lt;/FONT&gt;)

Dim DrawingName As String = (Left(newname, Len(newname) -3) &amp;amp; "dwg")

If Dir((Left(newname, Len(newname) -3) &amp;amp; "dwg")) = "" Then
DrawDoc.SaveAs(DrawingName, False)
End If

Dim oFD As FileDescriptor
 oFD = DrawDoc.ReferencedFileDescriptors(1).DocumentDescriptor.ReferencedFileDescriptor
  oFD.ReplaceReference(newname)
Dim oControlDef As ControlDefinition  = ThisApplication.CommandManager.ControlDefinitions.Item("UpdateCopiedModeliPropertiesCmd")
oControlDef.Execute

 
DrawDoc.Update()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DrawDoc.Save&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="white-space: normal; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;"&gt;&lt;BR /&gt;DrawDoc.Close&lt;/SPAN&gt;
&lt;BR /&gt;End Function&lt;/PRE&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>Tue, 13 Jul 2021 15:06:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10465398#M48131</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-07-13T15:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10465936#M48132</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;, I don't understand your ruler, where can I put this function?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 17:58:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10465936#M48132</guid>
      <dc:creator>Aron.Carvalho</dc:creator>
      <dc:date>2021-07-13T17:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pack and go using ilogic save all documents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10466323#M48133</link>
      <description>&lt;P&gt;You would call it just like a sub. Off course this doesn't match above terminology so is more for the principal of what needs to be achieved.&amp;nbsp; This is not tested.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Main&lt;/P&gt;&lt;P&gt;Dim&amp;nbsp;OldLoc As String&lt;/P&gt;&lt;P&gt;OldLoc = "C:\Users\1234.dwg&lt;/P&gt;&lt;P&gt;Dim newname As String&lt;/P&gt;&lt;P&gt;newname = "12345"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'*******************Insert Message 1 rule here copying of&amp;nbsp; rules here etc********************&lt;/P&gt;&lt;P&gt;'Call Save As Drawing&lt;/P&gt;&lt;P&gt;Call&amp;nbsp;DrawingReplace(OldLoc , newname )&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 20:36:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/pack-and-go-using-ilogic-save-all-documents/m-p/10466323#M48133</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-07-13T20:36:18Z</dc:date>
    </item>
  </channel>
</rss>

