Sets the rules that must be satisfied for a given element to pass this filter.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public bool SetElementFilter( ElementFilter elementFilter )
Parameters
- elementFilter ElementFilter
- An ElementFilter representing the rules. It may be an ElementParameterFilter representing a conjunction of one or more FilterRules, or an ElementLogicalFilter (of type LogicalAndFilter or LogicalOrFilter) representing a logical combination of FilterRules, using AND/OR operations.
Return Value
BooleanReturns true if this ParameterFilterElement was changed, false if not. It will not be changed if the input rules are equivalent to the ParameterFilterElement's existing rules.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | One of the given rules refers to a parameter that does not apply to this filter's categories. |
| ArgumentNullException | A non-optional argument was null |
| ArgumentsInconsistentException | The ElementFilter is not acceptable for use by a ParameterFilterElement. |
