<?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: [iLogic] Pack&amp;amp;Go rule problem in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9413313#M64982</link>
    <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems as if this problem only occurs with iLogic. The same code should work as expected in an external application.&lt;/P&gt;&lt;P&gt;See this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/inventor-pack-and-go-using-ilogic/td-p/6405492" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/inventor-pack-and-go-using-ilogic/td-p/6405492&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The problem has been investigated before but it seems like no one has come up with a solution.&lt;/P&gt;&lt;P&gt;Would it work for you to create an external app instead?&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 20:57:46 GMT</pubDate>
    <dc:creator>JhoelForshav</dc:creator>
    <dc:date>2020-03-31T20:57:46Z</dc:date>
    <item>
      <title>[iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9412439#M64981</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a pack and go rule that works as following:&lt;/P&gt;&lt;P&gt;- Create pack and go (in a folder with current date and time in it's name)&lt;/P&gt;&lt;P&gt;- Create ZIP&lt;/P&gt;&lt;P&gt;- Delete pack and go folder&lt;/P&gt;&lt;P&gt;- Ask to open ZIP&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem: It generates pack and go, but with only main assembly. It does not search for additional files. Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is complete rule:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If ThisApplication.ActiveDocument.DocumentType &amp;lt;&amp;gt; kAssemblyDocumentObject Then
	MessageBox.Show("Apenas pode executar esta macro num ficheiro *.iam", "Erro!")
	Return
End If

ThisApplication.ActiveDocument.Save2

Dim oFolder As String = System.IO.Directory.GetParent(ThisDoc.Path).ToString &amp;amp; "\8-BACKUP [ZIP]\PG_" &amp;amp; IO.Path.GetFileNameWithoutExtension(ThisDoc.ModelDocument.FullFileName) &amp;amp; "_" &amp;amp; DateTime.Now.ToString("yyyy.MM.dd_HH.mm.ss")' &amp;amp; "\"

Try
	MkDir(oFolder)
	Catch
End Try

Dim oPacknGoComp As New PackAndGoLib.PackAndGoComponent
Dim oPacknGo As PackAndGoLib.PackAndGo = oPacknGoComp.CreatePackAndGo(ThisApplication.ActiveEditDocument.FullFileName, oFolder)
'oPacknGo.ProjectFile = ThisApplication.DesignProjectManager.ActiveDesignProject.FullFileName

Dim oReferencedFiles = New String() {}
Dim oMissingFiles = New Object
'Dim oSearchedFiles = New String() {}
'Dim oReferencingFiles = New String() {}

oPacknGo.SkipLibraries = True
oPacknGo.SkipStyles = True
oPacknGo.SkipTemplates = True
oPacknGo.CollectWorkgroups = False
oPacknGo.KeepFolderHierarchy = True
oPacknGo.IncludeLinkedFiles = True

oPacknGo.SearchForReferencedFiles(oReferencedFiles, oMissingFiles)
oPacknGo.AddFilesToPackage(oReferencedFiles)
'oPacknGo.SearchForReferencingFiles(oSearchedFiles, oReferencingFiles, False, ThisDoc.WorkspacePath &amp;amp; "\", True)
'oPacknGo.AddFilesToPackage(oReferencingFiles)
	
oPacknGo.CreatePackage()

System.IO.Compression.ZipFile.CreateFromDirectory(oFolder, oFolder &amp;amp; ".zip")

Dim oCommand As String = CStr("cmd.exe /c rmdir /s /q " &amp;amp; """" &amp;amp; oFolder &amp;amp; "\""")
Dim oShellCommand As Object = CreateObject("WScript.Shell")
oShellCommand.Run (oCommand)

If MsgBox ("Deseja abrir o ficheiro ZIP do Pack And Go?",vbYesNo) = vbYes Then
	oCommand = CStr("cmd.exe /c """ &amp;amp; oFolder &amp;amp; ".zip""")
	oShellCommand.Run(oCommand)
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9412439#M64981</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2020-03-31T15:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9413313#M64982</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems as if this problem only occurs with iLogic. The same code should work as expected in an external application.&lt;/P&gt;&lt;P&gt;See this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/inventor-pack-and-go-using-ilogic/td-p/6405492" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/inventor-pack-and-go-using-ilogic/td-p/6405492&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The problem has been investigated before but it seems like no one has come up with a solution.&lt;/P&gt;&lt;P&gt;Would it work for you to create an external app instead?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:57:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9413313#M64982</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-03-31T20:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9414613#M64983</link>
      <description>&lt;P&gt;Hi. Unfortunately I have no idea how to do it. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anyone do the application before and provided it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have readed the topic, but the application was not provided.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: Would it work with VBA? Is there any VBA sample available? I can only find iLogic samples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 13:25:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9414613#M64983</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2020-04-01T13:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9414664#M64984</link>
      <description>&lt;P&gt;I don't know about VBA. I suspect you'll get the same error but it shouldn't be that much of a hassle to convert it to VBA and try? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it doesn't work, my recommendation is that you check out the "My first plugin" guide.&lt;/P&gt;&lt;P&gt;The first lesson is creating a simple forms app that interacts with inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/check-out-the-self-paced-guide-my-first-plug-in/td-p/3115642" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/check-out-the-self-paced-guide-my-first-plug-in/td-p/3115642&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you already have the VB.Net code i think this will be fairly easy for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 13:24:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9414664#M64984</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-04-01T13:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9417127#M64985</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of addin, you can also create standalone application. For more details, refer suggestions in the below links.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/pack-and-go-api/td-p/6797037" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/pack-and-go-api/td-p/6797037&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/manufacturing/2013/05/use-packandgo-of-2014-api.html" target="_blank"&gt;https://adndevblog.typepad.com/manufacturing/2013/05/use-packandgo-of-2014-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also try the below suggestions to copy files from one folder to another folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/vba-copy-all-files-in-the-active-document-to-a-new-location/td-p/5382571" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/vba-copy-all-files-in-the-active-document-to-a-new-location/td-p/5382571&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 10:40:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9417127#M64985</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-04-02T10:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9472944#M64986</link>
      <description>&lt;P&gt;I didnt get the problem solved yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to try it on Visual Studio. Will be my first addin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any pack and go addin sample avaiable?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:56:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9472944#M64986</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2020-04-27T10:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473063#M64987</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made an example project for you.&lt;/P&gt;&lt;P&gt;See attached archive &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473063#M64987</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-04-27T11:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473270#M64988</link>
      <description>&lt;P&gt;Thank you. That is great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will check it now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can that be saved as a standalone exe file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I am unable to make a clean exe release. Here is log:&lt;/P&gt;&lt;P&gt;EDIT2: Solved. Just needed correct path for&amp;nbsp;Autodesk.PackAndGo.Interop&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>Mon, 27 Apr 2020 13:10:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473270#M64988</guid>
      <dc:creator>amarcoc</dc:creator>
      <dc:date>2020-04-27T13:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: [iLogic] Pack&amp;Go rule problem</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473579#M64989</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4621185"&gt;@amarcoc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know how it goes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 14:33:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-pack-amp-go-rule-problem/m-p/9473579#M64989</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-04-27T14:33:43Z</dc:date>
    </item>
  </channel>
</rss>

