Creates an instance of a schedule segment on a sheet.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2022.1
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DB Document
The document
- viewSheetId
- Type: Autodesk.Revit.DB ElementId
The id of the sheet where the schedule segment will be placed.
- scheduleId
- Type: Autodesk.Revit.DB ElementId
The id of the schedule view.
- origin
- Type: Autodesk.Revit.DB XYZ
Location on the sheet where the schedule segment will be placed.
- segmentIndex
- Type: System Int32
The schedule segment index of the schedule instance.
Return Value
The new ScheduleInstance.Remarks
The segment index value could be -1, which means to create an instance for the entire schedule, see SegmentIndex property for more details.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | scheduleId is not a ViewSchedule that can be added to sheets. "Internal" schedules are not user-visible but are filtered by sheet or used to manage Revisions, which cannot be added to sheets. -or- viewSheetId is not a ViewSheet. -or- segmentIndex is not a valid segment index. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions ModificationForbiddenException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process. |
Autodesk.Revit.Exceptions ModificationOutsideTransactionException | The document has no open transaction. |