IsViewIdValidForPreview Method


Identifies if the view id is valid as a preview view id.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2012

Syntax

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

Parameters

viewId
Type: Autodesk.Revit.DB ElementId
The view id.

Return Value

True if the view id is valid for preview, false otherwise.

Remarks

Only graphical views (3d or 2d) are valid for use as a preview view. Other views (such as view templates) will not pass this method. InvalidElementId is accepted by this method as this id means that no special view is set for the preview.

Exceptions

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

See Also