RVTDocs.com
Namespace: Autodesk.Revit.DB Class: ViewSchedule

ViewSchedule.GetScheduleInstances

Method
Description:
Gets the instances ids of schedule or schedule segment.
Remarks:

The segment index value could be -1, it means to get schedule instances for the entire schedule.

When a (primary) schedule is set to filter by sheet and placed on a sheet, it will create a new schedule with elements visible in the Viewport(s) on that sheet. The instance created belongs to the newly created schedule. Calls to GetScheduleInstances() will return instances of the newly created schedule but no instances of the primary schedule.

Syntax
public IList<ElementId> GetScheduleInstances(
	int segmentIndex
)
Parameters
Parameter Type Description
segmentIndex Int32 Index of the segment.
Return Value
Type Description
IList The array of schedule sheet instance element ids of schedule or schedule segment.
Exceptions
Exception Condition
ArgumentException The segment index should start from -1 and be less than the total segment count.