Revit 2024 API |
Document..::..DocumentSaved Event |
Document Class See Also |
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.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:
- Close()()()() and similar overloads.
- Save()()()() .
- SaveAs(String) and similar overloads.
Exception InvalidOperationException will be thrown if any of the above methods is called during this event.