- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I found several example for importing SAT files in Revit and see that I could do it in two way, one is Document.Import and other is ShapeImporter.Convert
Why there is two way to do it. Is there a recommanded one?
We actually use Document.Import and it seems to be fine in Revit 2020.
We try the same SAT file in Revit 2022 and found that there is some missing element.
We then try with ShapeImporter.Convert and then create a DirectShape and missing element appear, the missing element are imported as mesh.
is this change in Revit 2022 a bug or the expected beahvior? Is there ane change note which explain why?
Finally, in all the example I found on internet for using ShapeImporter, I see that, we should do ShapeImpoter.Convert then open a transaction, create a direct shape and then commit the transaction.
In my test I found that if a run the command ShapeImporter.Convert outside a transaction, I've got an exception of type "Autodesk.Revit.Exceptions.ModificationOutsideTransactionException" with message Attempt to modify the model outside of transaction.
Is it require to open a transaction before calling ShapeImporter.Convert?
What is the modification done to the document (I've understand that the ShapeImporter create the geometry list but doesn't write it toe the file) ?
Thanks
Solved! Go to Solution.