IsViewIdValidForViewport Method


Verifies that the Viewport can change it's view id to the input %viewId%.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2023

Syntax

C#
public bool IsViewIdValidForViewport(
	ElementId viewId
)
Visual Basic
Public Function IsViewIdValidForViewport ( _
	viewId As ElementId _
) As Boolean
Visual C++
public:
bool IsViewIdValidForViewport(
	ElementId^ viewId
)

Parameters

viewId
Type: Autodesk.Revit.DB ElementId
The view which will be checked to see if it can be applied to Viewport.

Return Value

True if the %viewId% is valid for the viewport, false otherwise.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →