GetLinePattern Method (Document, ElementId)


Gets the LinePattern associated to an element or from a built-in line pattern.

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

Syntax

C#
public static LinePattern GetLinePattern(
	Document document,
	ElementId elementId
)
Visual Basic
Public Shared Function GetLinePattern ( _
	document As Document, _
	elementId As ElementId _
) As LinePattern
Visual C++
public:
static LinePattern^ GetLinePattern(
	Document^ document, 
	ElementId^ elementId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which to retrieve the LinePattern.
elementId
Type: Autodesk.Revit.DB ElementId
The ElementId of the LinePatternElement or the built-in line pattern id.

Return Value

A copy of LinePattern object. a null reference ( Nothing in Visual Basic) if the ElementId doesn't represent a line pattern element or built-in line pattern. a null reference ( Nothing in Visual Basic) for Solid.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

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 →