Revit 2023 API |
ViewSchedule..::..DeleteSegment Method |
ViewSchedule Class See Also |
Deletes a schedule segment.
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 DeleteSegment( int segmentIndex ) |
Visual Basic |
---|
Public Sub DeleteSegment ( _ segmentIndex As Integer _ ) |
Visual C++ |
---|
public: void DeleteSegment( int segmentIndex ) |
Parameters
- segmentIndex
- Type: System..::..Int32
Zero-based index of the segment.
Remarks
If the last segment is deleted, the previous one will be the last one and its height will be modified to unlimited.
If one segment is deleted when there are only two segments, all the instances will be deleted and the schedule
will become unsplit again.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The segment index should start from 0 and be less than the total segment count. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | This ViewSchedule is not split yet. |