DocumentSavedAs Event


Subscribe to the DocumentSavedAs event to be notified immediately after Revit has finished saving document with a new file name.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2010

Syntax

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

Remarks

This event is raised immediately after Revit has finished saving document with a new file name. Note that the first save of a newly created document will raise DocumentSavedAs rather than DocumentSaved event. It is raised even when document saving failed or was cancelled (during DocumentSavingAs 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