I have several addins that use the Revit API standard ShapeImporter.Convert() method in Revit and 3DM files. When Rhino.Inside.Revit is active and the ShapeImporter.Convert() method is run in any addin, Revit hard crashes. As another test, following up on this issue, I also tried running the ShapeImporter.Convert() method through Rhinoceros.InvokeInHostContext() and the crashing still occurs
In addition, Revit’s out-of-the-box Rhino 3DM import (Revit ribbon > Insert > Import CAD > 3DM) produces a hard crash when Rhino.Inside is active as well. I suspect this is also related to this issue and resource conflicts behind the scenes between Rhino.Inside and Revit.
The ShapeImporter.Convert() method works when Rhino.Inside is not loaded - as does the OOTB Import CAD for 3DM. Current testing is in Revit 2020.
ShapeImporter shapeImporter = new ShapeImporter();
shapeImporter.InputFormat = ShapeImporterSourceFormat.Rhino;
IList<GeometryObject> shapes = shapeImporter.Convert(rvtDoc, "[PATH TO 3DM]");
This is a problem we have been trying to solve since the project started.
Finally looks like we found a way to solve it at least in our test cases, but would be really helpful if you can test it before we release.
I think we may have something to share here this Thursday.
@kike Wonderful! I am happy to test. Let me know if/when a build is available and I can put it through it’s paces.
Thanks for this. Initial tests here are being successful! It appears that the ShapeImport.Convert() API method is now working and, by extension, OOTB Insert CAD is also working now.
I will continue to test out the methods I’m employing before marking the solution.
One note for others who may find this MSI - I had to uninstall my prior Rhino.Inside.Revit install which deployed to the %appdata% addin location. The MSI here deployed to C:\ProgramData addin location and didn’t overwrite the prior install. Not a big deal - but thought I would note it to avoid confusion.
Thanks for testing it.
Good point, yes from now on Rhino.Inside Revit will require admin privileges to install.
The oficial installer is already available.