DocumentSaved Event


Subscribe to the DocumentSaved event to be notified immediately after Revit has finished saving a document.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Since: 2010

Syntax

C#
public event EventHandler<DocumentSavedEventArgs> DocumentSaved
Visual Basic
Public Event DocumentSaved As EventHandler(Of DocumentSavedEventArgs)
Visual C++
public:
 event EventHandler<DocumentSavedEventArgs^>^ DocumentSaved {
	void add (EventHandler<DocumentSavedEventArgs^>^ value);
	void remove (EventHandler<DocumentSavedEventArgs^>^ value);
}

Remarks

This event is raised immediately after Revit has finished saving a document. Note that the first save of a newly created document will raise DocumentSavedAs rather than the DocumentSaved event. It is raised even when document saving failed or was cancelled (during DocumentSaving event).

Handlers of this event are permitted to make modifications to any document (including the active document), except for documents that are currently in read-only mode.

Check the 'Status' property in event's argument to see whether the action itself was successful or not.

This event is not cancellable, for the process of saving document has already been finished.

The following API functions are not available for the current document during this event:

Exception InvalidOperationException will be thrown if any of the above methods is called during this event.

See Also