GetLinePatternId Method


Gets the line pattern id associated with this category for the given graphics style type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Since: 2017

Syntax

C#
public ElementId GetLinePatternId(
	GraphicsStyleType graphicsStyleType
)
Visual Basic
Public Function GetLinePatternId ( _
	graphicsStyleType As GraphicsStyleType _
) As ElementId
Visual C++
public:
ElementId^ GetLinePatternId(
	GraphicsStyleType graphicsStyleType
)

Parameters

graphicsStyleType
Type: Autodesk.Revit.DB GraphicsStyleType
The type of graphics style.

Return Value

Returns the line pattern id associated with this category for the given graphics style type.

Remarks

  • The line pattern id will be one of the following:
  • A negative value (representing a built-in line pattern)
  • The id of a LinePatternElement
  • InvalidElementId, indicating that this category does not have a stored line pattern id for this graphics style type.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →