<?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: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993240#M76998</link>
    <description>My start method is....&lt;BR /&gt;&lt;BR /&gt;public bool Start()&lt;BR /&gt;{&lt;BR /&gt;Debug.WriteLine("Start");&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I will try to build a sample plugin which reproduces the problem when I get&lt;BR /&gt;a chance over the next few days, and post on a new thread.&lt;BR /&gt;&lt;BR /&gt;Paul</description>
    <pubDate>Sat, 26 Apr 2014 14:13:59 GMT</pubDate>
    <dc:creator>pfk</dc:creator>
    <dc:date>2014-04-26T14:13:59Z</dc:date>
    <item>
      <title>Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4978936#M76990</link>
      <description>&lt;P&gt;My plugin is causing an exception with Revit 2015 on the following line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CustomExporter exporter = new CustomExporter(document, m_ExportContext);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code works fine with Revit 2014.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exception raised is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;An unhandled exception of type 'Autodesk.Revit.Exceptions.InternalException' occurred in RevitAPI.dll&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Additional information: Failed to register a managed object for the currently active external application. A possible cause may be an inactive external application (not being invoked by Revit at present) attempting to assess the Revit API from a modeless dialog or another outside thread.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has something changed in Revit 2015?&amp;nbsp; The modeless dialog calling the above code is not "inactive".&amp;nbsp; Does anyone know how I can get around this issue pls?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2014 10:00:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4978936#M76990</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-22T10:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4980374#M76991</link>
      <description>&lt;P&gt;Hello Paul!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Although it is a bit odd that the exception is an Internal exception, the reported details suggest what could be wrong. It is indeed illegal making out-of-context calls to Revit API from a modeless dialog. It has &lt;U&gt;always&lt;/U&gt; been illegal, but Revit does not always enforces that in all possible situations. More and more checks are added to the API in each release to enforce this rule against illegal invocations of the Revit API. I believe this particular case is one of those that had been addressed in R2015.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;What I mean by "illegal" is the case when some add-in makes calls to the Revit API at times that is not within a regular and standard API context, that is a process started by Revit, such as an external command, dynamic updater, event, call-back, etc. This is the case, for example, of a modeless dialog invoking the API at any given time (i.e. outside of the contexts mentioned above). That has been always illegal and unsupported in Revit, for Revit does not support external access from multiple threads. There are only two legitimate situations in which a modeless dialog can communicate with Revit, and that is 1)&amp;nbsp;during an Idling event, and 2) via an External event. Both cases are well documented and sampled in the SDK. (Look for Modeless dialog.)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So, in your particular case of trying to register a Custom Exporter, this is what is happening: Your app implements an Export Context and instantiates it. Then it tries to invoke a custom export with the context object as an argument. Revit needs to associate the given object with the&amp;nbsp;currently active (i.e. being invoked by Revit) application. However, since the call to export was called from an&amp;nbsp;independent modeless dialog, there is no active application available,&amp;nbsp;hence the exception.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I hope I’ve explained it satisfactorily.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Arnošt Löbel&lt;/DIV&gt;
&lt;DIV&gt;Sr. Principal Engineer&lt;/DIV&gt;
&lt;DIV&gt;Autodesk, Revit R&amp;amp;D&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Apr 2014 17:46:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4980374#M76991</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-22T17:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981152#M76992</link>
      <description>&lt;P&gt;cf. comment and answer on&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/04/revit-2015-released.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/04/revit-2015-released.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/04/revit-2015-released.html?cid=6a00e553e16897883301a73daf8920970d#comment-6a00e553e16897883301a73daf8920970d" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/04/revit-2015-released.html?cid=6a00e553e16897883301a73daf8920970d#comment-6a00e553e16897883301a73daf8920970d&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 00:04:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981152#M76992</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-04-23T00:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981202#M76993</link>
      <description>&lt;P&gt;Thanks for the detailed responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have moved all the code to run via an IExternalEvent, which resolves the above problem.&amp;nbsp; However I now have an issue where Revit is crashing when the plugin is obtaining a list of linked documents (which is occurring in the IExportContext.Finish() method.&lt;BR /&gt;&lt;BR /&gt;I am using some code I think Jeremy posted some time ago to do this.&amp;nbsp; The code is:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static IEnumerable&amp;lt;Document&amp;gt; GetLinkedDocuments( Document _document )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var linkedfiles = GetLinkedFileReferences( _document );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var linkedFileNames = linkedfiles.Select( x =&amp;gt; ModelPathUtils.ConvertModelPathToUserVisiblePath( x.GetAbsolutePath() ) ).ToList();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _document.Application.Documents.Cast&amp;lt;Document&amp;gt;().Where( doc =&amp;gt; linkedFileNames.Any( fileName =&amp;gt; doc.PathName.Equals( fileName ) ) );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;The crash occurs on the return statement line.&amp;nbsp; This function is working fine on Revit 2014.&lt;BR /&gt;&lt;BR /&gt;The specific exception leading to the crash is:&lt;BR /&gt;&lt;BR /&gt;An unhandled exception of type 'System.AccessViolationException' occurred in RevitAPI.dll&lt;BR /&gt;&lt;BR /&gt;Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your quick and detailed responses.&amp;nbsp; Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 00:49:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981202#M76993</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-23T00:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981212#M76994</link>
      <description>I recommend converting the LINQ statements into more manageable, albeit longer C# code in order to find which particular file from the collection of linked files gives you trouble. I assume the crash occurs on the last line of your snippet, correct?&lt;BR /&gt;&lt;BR /&gt;Arnošt Löbel</description>
      <pubDate>Wed, 23 Apr 2014 01:04:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4981212#M76994</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-23T01:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4992328#M76995</link>
      <description>&lt;P&gt;I have spent a few more days on this and am now at a dead-end.&amp;nbsp; It appears to me that there is a bug in Revit 2015, such that referening linked files is crashing Revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, load a revit scene which includes linked content, then the CustomeExport.Export function crashes Revit immediately after the Start method is called, and prior any other callback methods being called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Revit 2014 this all runs fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks like a critical bug in Revit 2015,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2014 03:33:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4992328#M76995</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-26T03:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993192#M76996</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Paul:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;So, it looks like this is a different issue than as originally posted, correct? Should I assume that once you re-implemented your custom exporter using&amp;nbsp;the External Event mechanism the exporting itself does not give you the originally mentioned exception anymore? (Instead, now you see a crash when accessing linked files.)&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;If so, I suggest you start a new thread (maybe something like&amp;nbsp;– Cannot access linked files via the API). In there, please post&amp;nbsp;a snippet of the code that crashes in your app.&amp;nbsp;If it can be a version less compact than what you posted&amp;nbsp;originally it would help a lot, for then we could focus on one single line of code at a time. Also, please describe whether it is any linked file whatsoever that gives you this problem, or only some files. If the latter is the case, please describe what is different about those files.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;Posting the code snippet in as simple a form as possible (one simple command per line, no LINQ, no special language features if possible) is very helpful for us to better understand what may be going on. I am a bit intrigued by you experimenting “&lt;SPAN&gt;&lt;FONT face="Times New Roman"&gt;System.AccessViolationException&lt;/FONT&gt;&lt;/SPAN&gt;” exception, for I believe Revit does not normally causes that exception from its internal code, because most of Revit is native and if there is an access violation it would propagate differently. It is, however (to my best knowledge) possible such a managed exception coming from Revit Server, since major parts of that framework are managed. Which leads me to a question: Are the linked files you try to access local or are there on&amp;nbsp;a server?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;Arnošt Löbel&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;Sr. Principal Engineer&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#000000"&gt;Autodesk, Revit R&amp;amp;D&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 26 Apr 2014 13:17:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993192#M76996</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-26T13:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993194#M76997</link>
      <description>One more thing: I will try to play with it too to see if I can reproduce it. Paul, you stated Export crashes just after the Start method was invoked. Do you have anything in the Start method or is is empty? Do you try to access the linked documents from there? &lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;Arnošt Löbel&lt;BR /&gt;Sr. Principal Engineer&lt;BR /&gt;Autodesk, Revit R&amp;amp;D</description>
      <pubDate>Sat, 26 Apr 2014 13:22:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993194#M76997</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-26T13:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993240#M76998</link>
      <description>My start method is....&lt;BR /&gt;&lt;BR /&gt;public bool Start()&lt;BR /&gt;{&lt;BR /&gt;Debug.WriteLine("Start");&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I will try to build a sample plugin which reproduces the problem when I get&lt;BR /&gt;a chance over the next few days, and post on a new thread.&lt;BR /&gt;&lt;BR /&gt;Paul</description>
      <pubDate>Sat, 26 Apr 2014 14:13:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993240#M76998</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-26T14:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993444#M76999</link>
      <description>Interesting. I'll try the same.&lt;BR /&gt;And you said that the linked files are regular local Revit documents stored on your hardrive?&lt;BR /&gt;&lt;BR /&gt;Arnošt</description>
      <pubDate>Sat, 26 Apr 2014 18:10:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993444#M76999</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-26T18:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993660#M77000</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Paul,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;I have run a couple of tests exporting&amp;nbsp; documents with links and must report that it all went smoothly without a hiccup. I tried it in two different builds: my current local build (R2016 in progress) and R2015. In both cases I used my own sample application for testing custom export, each built for the respective Revit target. The sample application exports a selected 3D view and saves all incoming data in tidy XML format. It does not do anything else though. (&lt;EM&gt;Jeremy Tammik had posted a version of my sample on his blog a time ago – search for Custom Export if you are interested.&lt;/EM&gt;)&amp;nbsp;The export is invoked as an external command (to keep is simple).&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;The documents I tested the export with were trivial. A master document with nothing but three walls and a linked document with also three walls and a window on one of the walls. I used different materials for the walls, but that’s about it. Both the master and linked files were saved locally in one folder on my hard drive.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;So, exporting itself seems to be working for master and linked geometry. Thus I suspect the problem you are experiencing may be caused by something in your linked files. Therefore I suggest you put aside the export testing code for a while and spend some time with investigation of the linked files. A few posts back you showed a snippet of code in which you iterated through a set of linked files; you reported that the code would crash for you. That is of course very interesting and in my opinion it deservers looking into.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="line-height: 1.2;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;You also mentioned once that you played with External Events. I am not sure how it is all related together with the export and with linked files, but I suggest you start with as simple version of your application as possible. If you suspect the problem is with the export, remove everything else and try a simple export as an external command (no Iding, no External Event). Try to export a simple document first. If it works, add a simple link file and export again. If it works, go on with adding complexity.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; line-height: normal;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Arnošt Löbel&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Autodesk, Revit R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2014 22:09:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993660#M77000</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-26T22:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993732#M77001</link>
      <description>&lt;P&gt;New thread with code posted at &lt;A target="_self" href="https://forums.autodesk.com/t5/Revit-API/Revit-2015-InternalException-on-CustomExporter-with-Linked-Files/td-p/4993730"&gt;http://forums.autodesk.com/t5/Revit-API/Revit-2015-InternalException-on-CustomExporter-with-Linked-Files/td-p/4993730&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forgot to mention - crash doesn't occur if it's not in a separate thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sun, 27 Apr 2014 01:21:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993732#M77001</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-27T01:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993734#M77002</link>
      <description>&lt;P&gt;Additional info....The linked files are trivial (a single wall in a scene in the same folder as the host scene).&amp;nbsp; At a guess - I would say you are unable to reproduce the issue because you are doing it in the main UI thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sun, 27 Apr 2014 01:23:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4993734#M77002</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2014-04-27T01:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2015 exception with Autodesk.Revit.DB.CustomExporter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4994360#M77003</link>
      <description>&lt;P&gt;Paul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This is important&lt;/STRONG&gt;: What do you mean by &lt;STRONG&gt;separate&lt;/STRONG&gt; thread? We (in Revit) do not allow the API to be accessed from other that the main thread, thus there may not be a separate thread involved. Can you please explain what you meant?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arnošt Löbel&lt;/P&gt;
&lt;P&gt;Sr. Principal Engineer&lt;/P&gt;
&lt;P&gt;Autodesk, Revit R&amp;amp;A&lt;/P&gt;</description>
      <pubDate>Sun, 27 Apr 2014 19:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2015-exception-with-autodesk-revit-db-customexporter/m-p/4994360#M77003</guid>
      <dc:creator>arnostlobel</dc:creator>
      <dc:date>2014-04-27T19:52:06Z</dc:date>
    </item>
  </channel>
</rss>

