2021 Class
Changes 0
C

FileOpenDialog

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

The behavior and appearance of this dialog matches the Revit "Open" dialog. This is a general-purpose dialog for opening any given file type, and options to configure settings like worksharing options will not be included.

The user will be prompted to select an existing file that matches one of the provided filters. The user may not enter a file name that does not exist.

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

Use of this dialog does not actually open 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.FileOpenDialog
public class FileOpenDialog : FileDialog
Name Return Type Description Inherited From
C FileOpenDialog(String) None Constructs a new instance of a File Open dialog.
Name Return Type Description Inherited From
M Dispose() None Releases all resources used by the FileDialog
M GetSelectedModelPath() nullNothingnullptr Returns the selected file path chosen by the user. FileDialog
M IsValidFilterString(String) bool Determines if the input string is acceptable as input for a FileDialog filter string. FileDialog
M Show() ItemSelectionDialogResult Shows the dialog using the stored settings. FileDialog
Name Return Type Description Inherited From
P ShowPreview bool Identifies if the dialog should include a region showing a preview of the selected file.
P DefaultFilterEntry string The default entry (from the filter) to be selected in the dialog. FileDialog
P Filter string The filter string representing a collection of extensions allowed by the dialog. FileDialog
P IsValidObject bool Specifies whether the .NET object represents a valid Revit entity. FileDialog
P Title string The title to show on the dialog. FileDialog