Exporting .MAJ files using Revit API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to implement a C# Plugin in Revit 2023 and export multiple Assemblies to .MAJ files without asking for an export folder path for each assembly.
It seems, from what I was able to find, this use to be possible in Revit 2019 through a method ExportToMAJ() as mentioned here:
https://www.revitapidocs.com/2019/14c832e6-eb76-774b-1b75-acf03de6438c.htm
I couldn’t find an alternative supported by the latest version. It seems this portion of the Revit API was migrated to an external plugin and now it isn't available anymore inside default Revit API:
https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-4D0D796A-EDE6-4A36-8D3C-FD898975C378
I would like to explore some alternatives if anyone can confirm it works:
a) Creating MAJ files directly (it doesn't look like MAJ is a public documented file format)
b) Adding the external plugin DLL to the C# solution and access these classes (it could be something not supported officially and not future-proof)
c) Using the PostCommand() mechanism which can call the MAJ export command but wouldn't avoid the .MAJ file save dialog to pop up
d) Using the Journal mechanism to mimic the export command without exposing the MAJ export dialog
Any other possibilities you may suggest?
Thank you.