Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
This event is raised when Revit is just about to close a document.
This event is cancellable, except when it is raised as part of application closing. Check the 'Cancellable' property of event's argument to see whether it is cancellable or not. When it is cancellable, call the 'Cancel()' method of event's argument to True to cancel it. Your application is responsible for providing feedback to the user about the reason for the cancellation.
The document may not be modified during this event.
The following API functions are not available for the current document during this event:
- Close and similar overloads.
Exception InvalidOperationException will be thrown if any of the above methods is called during this event.
Another Autodesk::Revit::ApplicationServices::Application::DocumentClosed event will be raised immediately after document is closed.