GetSegment Method


Return a reference to one of the segments in the definition.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public RebarShapeSegment GetSegment(
	int segmentIndex
)
Visual Basic
Public Function GetSegment ( _
	segmentIndex As Integer _
) As RebarShapeSegment
Visual C++
public:
RebarShapeSegment^ GetSegment(
	int segmentIndex
)

Parameters

segmentIndex
Type: SystemInt32
Index of the segment (0 to NumberOfSegments - 1).

Return Value

The requested segment.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException segmentIndex is not between 0 and NumberOfSegments.

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 →