Tests whether a temporary view mode is currently enabled in the associated view.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2016 Subscription Update
Syntax
| C# |
|---|
public bool IsModeEnabled( TemporaryViewMode mode ) |
| Visual Basic |
|---|
Public Function IsModeEnabled ( _ mode As TemporaryViewMode _ ) As Boolean |
| Visual C++ |
|---|
public: bool IsModeEnabled( TemporaryViewMode mode ) |
Parameters
- mode
- Type: Autodesk.Revit.DB..::..TemporaryViewMode
The mode to evaluate
Return Value
True if the requested mode is available and enabled in the associated view; False otherwise.
Remarks
Most of temporary modes are enabled in a specific context only.
A programmer who wants to use a mode needs to first test whether
it is currently available and enabled, or not.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |