GetFillPatternElementByName Method


Retrieves the FillPatternElement by its name.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2012

Syntax

C#
public static FillPatternElement GetFillPatternElementByName(
	Document document,
	FillPatternTarget target,
	string name
)
Visual Basic
Public Shared Function GetFillPatternElementByName ( _
	document As Document, _
	target As FillPatternTarget, _
	name As String _
) As FillPatternElement
Visual C++
public:
static FillPatternElement^ GetFillPatternElementByName(
	Document^ document, 
	FillPatternTarget target, 
	String^ name
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which to retrieve the FillPatternElement.
target
Type: Autodesk.Revit.DB FillPatternTarget
The FillPatternTarget of the FillPatternElement.
name
Type: System String
The name of the FillPatternElement.

Return Value

The FillPatternElement.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException target must be Model or Drafting.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

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 →