Errors saving files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
Since I started working with Revit in 2017 I have been encountering a problem when it comes to saving files. What happens is that randomly the functions of "save" and "saveAs" launch InvalidOperationException with the message "save failed". To fix this, what I've been doing is calling the function until it doesn't throw any errors. This is the function I use:
This solves the problem when you only have to save one file for each execution. The problem is that I am now developing a project in which we need to open edit and save more than 100 files in each execution and the saving process occupies half of the execution time of the command, which usually takes in total between 15 and 20 minutes. Also, from time to time Revit crashes at this same point without leaving any logs. The only thing I can recover is the output of the debug window that ended like this:
Exception produced: 'Autodesk.Revit.Exceptions.InvalidOperationException' in RevitAPI.dll
Exception produced: 'Autodesk.Revit.Exceptions.InternalException' in RevitAPI.dll
The program '[32612] Revit.exe: Managed (v4.0.30319)' ended with code -1073740791 (0xc0000409).My clients need to be able to run the addin without the save function failing. What can I do to detect what's going on? Is there a way that Revit won't make this mistake?
Thank you for your help,
Pablo.