EnableTemporaryViewPropertiesMode Method


Turns Temporary View Properties mode on or off. In this mode, any changes made to the view are temporary and will be discarded once the mode is disabled.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2014

Syntax

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

Parameters

viewTemplateId
Type: Autodesk.Revit.DB ElementId
If the id of a view template is provided, Temporary View Properties mode is turned on and the settings from the template are applied to the view for the duration of the mode. If the id provided is not that of a template but the id of the view itself, Temporary View Properties mode is turned on without any changes to the view. If ElementId.InvalidElementId is provided, Temporary View Properties mode is turned off.

Return Value

Returns true when the view template provided by viewTemplateId was applied and Temporary View Properties was successfully turned on. Also returns true if ElementId.InvalidElementId was provided as input and Temporary View Properties was successfully turned off.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException View cannot use Temporary View Properties mode in current state.

See Also