Filter Property


The filter string representing a collection of extensions allowed by the dialog.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2017

Syntax

C#
public string Filter { get; set; }
Visual Basic
Public Property Filter As String
	Get
	Set
Visual C++
public:
property String^ Filter {
	String^ get ();
	void set (String^ value);
}

Field Value

The required format for this string is a collection of one or more filter labels (representing the text the user will see in the Files of Type pulldown) plus an associated file matching string separated by the '|' character. Some examples of valid filter strings:
  • "Revit Files (*.rvt)|*.rvt
  • "Revit Projects (*.rvt)|*.rvt|Revit Families (*.rfa)|*.rfa"
  • "All files|*.*"
  • "All Revit files (*.rvt, *.rfa, *.rte, *.rft)|*.rvt;*.rfa;*.rte;*.rft"

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException When setting this property: The input filter string does not meet the minimal requirements for a valid filter string.
Autodesk.Revit.ExceptionsArgumentNullException When setting this property: A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →