ScheduleSheetInstance.Create(Document, ElementId, ElementId, XYZ, Int32)
Method
Description:
Creates an instance of a schedule segment on a sheet.
Creates an instance of a schedule segment on a sheet.
Remarks:
The segment index value could be -1, which means to create an instance for the entire schedule, see SegmentIndex property for more details.
The segment index value could be -1, which means to create an instance for the entire schedule, see SegmentIndex property for more details.
Syntax
Parameters
Parameter | Type | Description |
---|---|---|
document | Document | The document |
viewSheetId | ElementId | The id of the sheet where the schedule segment will be placed. |
scheduleId | ElementId | The id of the schedule view. |
origin | XYZ | Location on the sheet where the schedule segment will be placed. |
segmentIndex | Int32 | The schedule segment index of the schedule instance. |
Return Value
Type | Description |
---|---|
ScheduleSheetInstance | The new ScheduleInstance. |
Exceptions
Exception | Condition |
---|---|
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. |
ArgumentNullException | A non-optional argument was null |
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. |
ModificationOutsideTransactionException | The document has no open transaction. |