<?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 Inventor Pack And Go crashes AutoCAD in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/inventor-pack-and-go-crashes-autocad/m-p/10625550#M15204</link>
    <description>&lt;P&gt;So within a C# AutoCAD plugin I've added a reference to Autodesk.PackAndGo.Interop.dll and am running the following code in an AutoCAD command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;				var packAndGoComp = new PackAndGoLib.PackAndGoComponent();
				var packAndGo = packAndGoComp.CreatePackAndGo(@"C:\Users\lharwood\Downloads\shovel 9.8.21 (2)\Workspaces\Workspace\acad demo\shovel model\GBU promodel-for-autocad-2022-shovel-process-09.07.2021.iam", @"C:\Users\lharwood\Desktop\PackAndGoOutput - Copy");
				packAndGo.ProjectFile = @"C:\Users\lharwood\Downloads\shovel 9.8.21 (2)\GBU promodel-for-autocad-2022-shovel-process-09.07.2021.ipj";
				string[] refFiles = new string[] { };
				object refMissFiles = new object();
				// Set the options
				packAndGo.SkipLibraries = true;
				packAndGo.SkipStyles = true;
				packAndGo.SkipTemplates = true;
				packAndGo.CollectWorkgroups = false;
				packAndGo.KeepFolderHierarchy = true;
				packAndGo.IncludeLinkedFiles = true;

				// Get the referenced files
				packAndGo.SearchForReferencedFiles(out refFiles, out refMissFiles);

				// Add the referenced files for package
				packAndGo.AddFilesToPackage(refFiles);

				// Start the pack and go to create the package
				packAndGo.CreatePackage(true);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It actually generates all the files as expected and returns out of my command method but then AutoCAD crashes and I get the following output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Exception thrown: 'System.Runtime.InteropServices.SEHException' in ManagedMC3.dll
DAImpl.RegisterAddin throws External component has thrown an exception.'acad.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\ProgramData\Autodesk\ApplicationPlugins\ProModel.AutoCAD.bundle\Contents\Autodesk.PackAndGo.Interop.dll'. Module was built without symbols.
The program '[15596] acad.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 21:41:49 GMT</pubDate>
    <dc:creator>lharwoodWZKMU</dc:creator>
    <dc:date>2021-09-15T21:41:49Z</dc:date>
    <item>
      <title>Inventor Pack And Go crashes AutoCAD</title>
      <link>https://forums.autodesk.com/t5/net-forum/inventor-pack-and-go-crashes-autocad/m-p/10625550#M15204</link>
      <description>&lt;P&gt;So within a C# AutoCAD plugin I've added a reference to Autodesk.PackAndGo.Interop.dll and am running the following code in an AutoCAD command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;				var packAndGoComp = new PackAndGoLib.PackAndGoComponent();
				var packAndGo = packAndGoComp.CreatePackAndGo(@"C:\Users\lharwood\Downloads\shovel 9.8.21 (2)\Workspaces\Workspace\acad demo\shovel model\GBU promodel-for-autocad-2022-shovel-process-09.07.2021.iam", @"C:\Users\lharwood\Desktop\PackAndGoOutput - Copy");
				packAndGo.ProjectFile = @"C:\Users\lharwood\Downloads\shovel 9.8.21 (2)\GBU promodel-for-autocad-2022-shovel-process-09.07.2021.ipj";
				string[] refFiles = new string[] { };
				object refMissFiles = new object();
				// Set the options
				packAndGo.SkipLibraries = true;
				packAndGo.SkipStyles = true;
				packAndGo.SkipTemplates = true;
				packAndGo.CollectWorkgroups = false;
				packAndGo.KeepFolderHierarchy = true;
				packAndGo.IncludeLinkedFiles = true;

				// Get the referenced files
				packAndGo.SearchForReferencedFiles(out refFiles, out refMissFiles);

				// Add the referenced files for package
				packAndGo.AddFilesToPackage(refFiles);

				// Start the pack and go to create the package
				packAndGo.CreatePackage(true);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It actually generates all the files as expected and returns out of my command method but then AutoCAD crashes and I get the following output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Exception thrown: 'System.Runtime.InteropServices.SEHException' in ManagedMC3.dll
DAImpl.RegisterAddin throws External component has thrown an exception.'acad.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\ProgramData\Autodesk\ApplicationPlugins\ProModel.AutoCAD.bundle\Contents\Autodesk.PackAndGo.Interop.dll'. Module was built without symbols.
The program '[15596] acad.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 21:41:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/inventor-pack-and-go-crashes-autocad/m-p/10625550#M15204</guid>
      <dc:creator>lharwoodWZKMU</dc:creator>
      <dc:date>2021-09-15T21:41:49Z</dc:date>
    </item>
  </channel>
</rss>

