SplitSegment Method


Splits the schedule segment by the given heights of new segments.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2022.1

Syntax

C#
public void SplitSegment(
	int segmentIndex,
	IList<double> segmentHeights
)
Visual Basic
Public Sub SplitSegment ( _
	segmentIndex As Integer, _
	segmentHeights As IList(Of Double) _
)
Visual C++
public:
void SplitSegment(
	int segmentIndex, 
	IList<double>^ segmentHeights
)

Parameters

segmentIndex
Type: System Int32
The index of segment, starting with 0.
segmentHeights
Type: System.Collections.Generic IList Double
An array contains the height for each new segment except the last segment. The height of the last segment will be determined by the height of previous new segments and the height of the split segment.

Remarks

The height values are used to set the height of schedule instance for each segment shown on sheet view. Each input height must be greater than 0 and the total height must be less than the height of the split segment.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The height of a schedule segment must be greater than 0. The total height must be less than the split segment height. The total segment count must be greater than 0 and less than 10000. -or- The segment index should start from 0 and be less than the total segment count.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException This ViewSchedule is not split yet.

See Also