Revit 2026 API
Area |
Gets the line from the desired layer at the specified index.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public Line GetLineFromLayerAtIndex( AreaReinforcementLayerType layer, int linePositionIndex )
Public Function GetLineFromLayerAtIndex ( layer As AreaReinforcementLayerType, linePositionIndex As Integer ) As Line
public: Line^ GetLineFromLayerAtIndex( AreaReinforcementLayerType layer, int linePositionIndex )
member GetLineFromLayerAtIndex : layer : AreaReinforcementLayerType * linePositionIndex : int -> Line
Parameters
- layer AreaReinforcementLayerType
- The layer on which the line stays.
- linePositionIndex Int32
- The index of the line from the desired layer. It should be an index between 0 and (NumberOfLines-1).
Return Value
LineReturns the line from the desired layer at the specified index.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | linePositionIndex is not in the range [ 0, NumberOfLines-1 ]. -or- A value passed for an enumeration argument is not a member of that enumeration |
| InapplicableDataException | The layer layer isn't active. |
This method will return the line even if it isn't included.
See Also