IsModeAvailable Method

Tests whether a temporary view mode is currently available in the associated view.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: (
Since: 2016 Subscription Update


public bool IsModeAvailable(
	TemporaryViewMode mode
Visual Basic
Public Function IsModeAvailable ( _
	mode As TemporaryViewMode _
) As Boolean
Visual C++
bool IsModeAvailable(
	TemporaryViewMode mode


Type: Autodesk.Revit.DB TemporaryViewMode
The mode to evaluate

Return Value

True of the temporary mode is currently available in the associated view.


Not every mode is available in all views at all times. Some of the modes are only available in certain views, or only at certain time/context. Modes that are not available will not be visible on the view's tool bar in the UI.

Even modes that are available do not have to be currently enabled in the current context. Before using a mode its applicability should be tested by calling IsModeEnabled(TemporaryViewMode) .


Exception Condition
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

See Also