FileDialog.filter Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

For each filtering option, the filter string contains a description of the filter and the filter pattern as specified in parentheses and separated by semi-colons. Multiple filters are separated by a double semi-colon. These are illustrated below.

The following is an example of a filter string:

Text files (*.txt);;All files (*.*)

You can add several filter patterns to a filter by separating the file types with semicolons, for example:

Image Files (*.BMP;*.JPG;*.GIF);;All files (*.*)

Syntax

"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.filter

# Set the value of the property.
fileDialog_var.filter = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->filter();

// Set the value of the property, where value_var is a string.
bool returnValue = fileDialog_var->filter(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
File Dialog Sample Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file API Sample Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014