Revit 2026 API
Fill |
Creates a new FillPatternElement.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static FillPatternElement Create( Document document, FillPattern fillPattern )
Public Shared Function Create ( document As Document, fillPattern As FillPattern ) As FillPatternElement
public: static FillPatternElement^ Create( Document^ document, FillPattern^ fillPattern )
static member Create : document : Document * fillPattern : FillPattern -> FillPatternElement
Parameters
- document Document
- The document in which to create the FillPatternElement.
- fillPattern FillPattern
- The FillPattern associated to the newly created FillPatternElement.
Return Value
FillPatternElementThe newly created FillPatternElement.

Exception | Condition |
---|---|
ArgumentException | fillPattern does not have a valid Target. -or- fillPattern does not have a valid Name. -or- fillPattern is a solid fill pattern. -or- fillPattern contains FillGrids with a zero Offset. -or- The name of the fillPattern already exists. |
ArgumentNullException | A non-optional argument was null |
See Also