2024 Method
Changes 0
M

Document.Close

Description:
Closes the document, save the changes if there are.
Remarks:
The currently active document may not be closed by this function. It can only be closed via Revit's UI.

The changes will saved automatically, the document will not be closed if failed to save changes. If the document was created in this current session and has not been saved to a file yet, it needs to call Revit::UI::UIDocument::SaveAndClose() method instead.

Overloads (2):
Close
public bool Close()
bool False if either closing procedure fails or if saving of a modified document failed. Also returns False if closing is cancelled by an external application during 'DocumentClosing' event. When function succeeds, True is returned.