<?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: Navisworks API - Unhandled Exception Error in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7648086#M4126</link>
    <description>&lt;P&gt;You try the "resolver" library&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;using Autodesk.Navisworks.Api.Resolver;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static void Main()&lt;BR /&gt;{&lt;BR /&gt;String runtimeName = Resolver.TryBindToRuntime(RuntimeNames.Any);&lt;BR /&gt;if (String.IsNullOrEmpty(runtimeName))&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Failed to bind to Navisworks runtime");&lt;BR /&gt;}&lt;BR /&gt;XMain();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XMain() is the existing Main function.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Dec 2017 01:02:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-26T01:02:22Z</dc:date>
    <item>
      <title>Navisworks API - Unhandled Exception Error</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7643160#M4125</link>
      <description>&lt;P&gt;I have a console exe that runs from a batch file to generate NWd files from a project list. I usually have it running from a scheduled task from a Windows 4 x64 pc. Although everything was working fine, when I updated some code it quit running from the task. I can double click and it will run fine, but it will not seem to run from a schedule task. I can also run it from with VS 2015 and there does not seem to have any issues or errors. This is the error I get from the Windows log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Application: XXXX.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Autodesk.Navisworks.Api.Automation.AutomationException at Autodesk.Navisworks.Api.Automation.NavisworksApplication.Init(Boolean) at XXXX.Program.Main(System.String[])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still trying to see what broke when I really didn't do much.&lt;/P&gt;&lt;P&gt;Thanks, Jgarza&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 21:08:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7643160#M4125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T21:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Navisworks API - Unhandled Exception Error</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7648086#M4126</link>
      <description>&lt;P&gt;You try the "resolver" library&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;using Autodesk.Navisworks.Api.Resolver;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static void Main()&lt;BR /&gt;{&lt;BR /&gt;String runtimeName = Resolver.TryBindToRuntime(RuntimeNames.Any);&lt;BR /&gt;if (String.IsNullOrEmpty(runtimeName))&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Failed to bind to Navisworks runtime");&lt;BR /&gt;}&lt;BR /&gt;XMain();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XMain() is the existing Main function.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 01:02:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7648086#M4126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-26T01:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Navisworks API - Unhandled Exception Error</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7652605#M4127</link>
      <description>&lt;P&gt;After i fix this issue i now get this error with a windows form. I do have it catching to display a messagebox....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NWD Issue.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/443735iC89C3ECAB0988FF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="NWD Issue.PNG" alt="NWD Issue.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;catch (Autodesk.Navisworks.Api.Automation.AutomationExcption e)&lt;BR /&gt;{&lt;BR /&gt;//An error occurred, display it to the user&lt;BR /&gt;System.Windows.Forms.MessageBox.Show("Error: " + e.Message);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch (Autodesk.Navisworks.Api.Automation.AutomationDocumentFileException e)&lt;BR /&gt;{&lt;BR /&gt;//An error occurred, display it to the user&lt;BR /&gt;System.Windows.Forms.MessageBox.Show("Error: " + e.Message);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;if (automationApplication != null)&lt;BR /&gt;{&lt;BR /&gt;automationApplication.Dispose();&lt;BR /&gt;automationApplication = null;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 15:57:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/navisworks-api-unhandled-exception-error/m-p/7652605#M4127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-28T15:57:38Z</dc:date>
    </item>
  </channel>
</rss>

