Exception in CustomExporter for Revit 2018

Exception in CustomExporter for Revit 2018

Anonymous
Not applicable
1,393 Views
8 Replies
Message 1 of 9

Exception in CustomExporter for Revit 2018

Anonymous
Not applicable

We are building a Revit plugin which exports rvt file to json for WebGL rendering. The core of plugin is a child class of IExportContext which is triggered by CustomExporter. The same piece of code works fine for rvt 2015 to 2017. After we rebuild the plugin with rvt 2018, we find the plugin will crash easily if we export multiple views. With some experiments, we find crash will occur unless we only export current active 3D view. 

 

Some other observation are

 

1) crash has not debug information. It crashes at revit DLLs.

2) crash happens right after IExportContext.OnViewEnd()

 

I attached a simplified code sample to illustrate the problem. Please help.

0 Likes
Accepted solutions (1)
1,394 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable

I post another link for this issue with new title of bug report. Close this one now.

0 Likes
Message 3 of 9

jeremytammik
Autodesk
Autodesk
Accepted solution

Thank you for reporting this.

 

I escalated your new thread to an ADN ticket for the development team to explore.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 9

Anonymous
Not applicable

I have the same weird issue with CustomExporter in Revit 2018. Everything is working from Revit 2016 to 2017. However Revit 2018 dumps out after running CustomExporter.Export() method and no way to debug it. Checking at the Revit journal file does not help anything.

 

There is also issue to run async/await methods in Revit 2018, I have to replace async methods with normal synchronous methods to avoid shutting down Revit unexpectedly.

 

System.Windows.Forms.Application.DoEvents() also crashes out Revit 2018, it may be a bug with the UI thread in Revit 2018.

0 Likes
Message 5 of 9

jeremytammik
Autodesk
Autodesk

What exception is thrown?

 

Have you tried to simply catch and ignore it?

 

I successfully handled a previous issue with the custom exporter in that manner:

 

http://thebuildingcoder.typepad.com/blog/2016/07/exporting-rvt-bims-to-webgl-and-forge.html#3 

 

https://github.com/jeremytammik/CustomExporterAdnMeshJson/compare/2017.0.0.2...2017.0.0.3

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 9

Anonymous
Not applicable

Hi Jeremy,

 

I cannot try/catch the error as it throws fatal error to shut down Revit. The issue happens only in Revit 2018. My project in Revit 2016 and 2017 is working fine.

 

Thanks.

0 Likes
Message 7 of 9

Anonymous
Not applicable

I installed Revit 2018 Update 3 and this issue is fixed. It did not work in the original Revit 2018. I am happy that Autodesk has this weird issue fixed with the new product updates.

0 Likes
Message 8 of 9

jeremytammik
Autodesk
Autodesk

Please provide a minimal reproducible case: 

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 9 of 9

jeremytammik
Autodesk
Autodesk

I wrote my previous message at the same time as you wrote that it was solved by the 2018.3 update. 

 

Wow, congratulations, and thank you for the good news!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes