2024 Method
Changes 0
M

UIDocument.SaveAndClose

Description:
Close the document, prompting the user for saving it when necessary.
Remarks:
UI dialogs may be shown during the call (e.g. when the document has been changed since last time it was saved) to get user responses. The currently active document may not be closed by this function. It can only be closed via Revit's UI.
public bool SaveAndClose()
bool False if closing procedure fails or if saving of a modified document was requested but failed. Also returns False if closing is cancelled by an external application during 'DocumentClosing' event. When function succeeds, True is returned.