CurveElementFilter
Description:
A filter used to pass curve elements which are of a specific type.
A filter used to pass curve elements which are of a specific type.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.ElementFilter
Autodesk.Revit.DB.ElementSlowFilter
Autodesk.Revit.DB.CurveElementFilter
System.Object
Autodesk.Revit.DB.ElementFilter
Autodesk.Revit.DB.ElementSlowFilter
Autodesk.Revit.DB.CurveElementFilter
public class CurveElementFilter : ElementSlowFilter
// Create a CurveElement filter to find CurveByPoints elements.
// It is necessary to use the CurveElementFilter, and not an ElementClassFilter or the shortcut
// method OfClass() because subclasses of CurveElement are not supported by those methods.
CurveElementFilter filter = new CurveElementFilter(CurveElementType.CurveByPoints);
// Apply the filter to the elements in the active document
FilteredElementCollector collector = new FilteredElementCollector(document);
ICollection<Element> founds = collector.WherePasses(filter).ToElements();
// Find all curve elements: use inverted filter with invalid CurveElementType to match elements
CurveElementFilter notCurveByPntFilter = new CurveElementFilter(CurveElementType.Invalid, true); // inverted filter
collector = new FilteredElementCollector(document);
ICollection<Element> notCurveByPntFounds = collector.WherePasses(notCurveByPntFilter).ToElements();
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| CurveElementFilter(CurveElementType) | None | Constructs a new instance of a filter to match specific types of curve elements. | |
| CurveElementFilter(CurveElementType, Boolean) | None | Constructs a new instance of a filter to match specific types of curve elements, with the option to match all curves which are not of the given curve type. |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| Dispose() | None | Releases all resources used by the | ElementFilter |
| PassesFilter(Document, ElementId) | bool | Applies the filter to a given element. | ElementFilter |
| PassesFilter(Element) | bool | Applies the filter to a given element. | ElementFilter |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| CurveElementType | CurveElementType | The curve element type. | |
| Inverted | bool | True if the results of the filter are inverted; elements that would normally be accepted by this filter will be rejected, and elements that would normally be rejected will be accepted. | ElementFilter |
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. | ElementFilter |