ViewActivating Event


Subscribe to the ViewActivating event to be notified when Revit is just about to activate a view of a document.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2010

Syntax

C#
public event EventHandler<ViewActivatingEventArgs> ViewActivating
Visual Basic
Public Event ViewActivating As EventHandler(Of ViewActivatingEventArgs)
Visual C++
public:
 event EventHandler<ViewActivatingEventArgs^>^ ViewActivating {
	void add (EventHandler<ViewActivatingEventArgs^>^ value);
	void remove (EventHandler<ViewActivatingEventArgs^>^ value);
}

Remarks

This event is raised when Revit is just about to activate a view of the document.

Event is not cancellable. The 'Cancellable' property of event's argument is always False. Your application is responsible for providing feedback to the user about the reason for the cancellation.

The document may be modified during this event.

The following API functions are not available for the current document during this event:

Exception InvalidOperationException will be thrown if any of the above methods is called during this event.

Another ViewActivated event will be raised immediately after view activating is finished.

See Also