2027 Class
Changes 0
C

FileSaveDialog

Description:
This class allows an add-in to prompt the user with the Revit dialog used to navigate to and select an existing or new file path. This dialog is typically used to enter a file name for saving or exporting.
Remarks:

The behavior and appearance of this dialog matches the Revit "Save as" dialog. This is a general-purpose dialog for saving any given file type, and the Options shown in the dialog for Revit projects and families will not be shown. To prompt the user to save the active Revit document specifically, use UIDocument.SaveAs(UISaveAsOptions) instead.

The user will be requested to select or enter a file name matching the corresponding filter. If an existing file is selected, there will be a default prompt about overwriting the file shown, where the user can confirm or cancel this file selection.

The folder location shown when the dialog is displayed defaults to the most recently used file location for saving or exporting.

Use of this dialog does not actually save an existing file, but it will provide the selected file path back to the caller to take any action necessary.

Inheritance Hierarchy:
System.Object
  Autodesk.Revit.UI.FileDialog
    Autodesk.Revit.UI.FileSaveDialog
public class FileSaveDialog : FileDialog
Name Return Type Description Inherited From
C FileSaveDialog(String) None Constructs a new instance of a File Save dialog.
Name Return Type Description Inherited From
M Dispose() None (Inherited from FileDialog ) FileDialog
M Equals None Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
M GetHashCode None Serves as the default hash function. (Inherited from Object ) Object
M GetSelectedModelPath() ModelPath Returns the selected file path chosen by the user. (Inherited from FileDialog ) FileDialog
M GetType None Gets the Type of the current instance. (Inherited from Object ) Object
M Show() ItemSelectionDialogResult Shows the dialog using the stored settings. (Inherited from FileDialog ) FileDialog
M ToString None Returns a string that represents the current object. (Inherited from Object ) Object
Name Return Type Description Inherited From
P DefaultFilterEntry string The default entry (from the filter) to be selected in the dialog. (Inherited from FileDialog ) FileDialog
P Filter string The filter string representing a collection of extensions allowed by the dialog. (Inherited from FileDialog ) FileDialog
P InitialFileName string The initial file name to be shown for this save operation.
P IsValidObject Boolean Specifies whether the .NET object represents a valid Revit entity. (Inherited from FileDialog ) FileDialog
P Title string The title to show on the dialog. (Inherited from FileDialog ) FileDialog