GetAllViewports Method


View Sheet Get All Viewports Method

Returns the ElementIds of Viewports on this sheet.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ICollection<ElementId> GetAllViewports()

Return Value

ICollection ElementId
The Viewports on this sheet.
Remarks
Schedules on the sheet are not returned by this method. Use ScheduleSheetInstance.OwnerViewId to find the sheet on which a schedule is placed.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →