Revit 2025 API
CategorySet |
Sets the line pattern id associated with this category for the given graphics style type.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void SetLinePatternId( ElementId linePatternId, GraphicsStyleType graphicsStyleType )
Public Sub SetLinePatternId ( linePatternId As ElementId, graphicsStyleType As GraphicsStyleType )
public: void SetLinePatternId( ElementId^ linePatternId, GraphicsStyleType graphicsStyleType )
member SetLinePatternId : linePatternId : ElementId * graphicsStyleType : GraphicsStyleType -> unit
Parameters
- linePatternId ElementId
- The line pattern id for the graphics style.
- graphicsStyleType GraphicsStyleType
- The type of graphics style.

Exception | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when the input argument "linePatternId" is an illegal id. |
InvalidOperationException | Thrown when this category does not have stored line pattern id for this graphics style type. |

- The line pattern id will be one of the following:
- A negative value (representing a built-in line pattern); this value can only be obtained via GetLinePatternId
- The id of a LinePatternElement
See Also