ViewScheduleGetScheduleInstances Method

Gets the instances ids of schedule or schedule segment.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public IList<ElementId> GetScheduleInstances(
	int segmentIndex
)

Parameters

segmentIndex  Int32
Index of the segment.

Return Value

IListElementId
The array of schedule sheet instance element ids of schedule or schedule segment.
Exceptions
ExceptionCondition
ArgumentException The segment index should start from -1 and be less than the total segment count.
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.

See Also