ViewActivated Event


Subscribe to the ViewActivated event to be notified immediately after Revit has finished activating 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<ViewActivatedEventArgs> ViewActivated
Visual Basic
Public Event ViewActivated As EventHandler(Of ViewActivatedEventArgs)
Visual C++
public:
 event EventHandler<ViewActivatedEventArgs^>^ ViewActivated {
	void add (EventHandler<ViewActivatedEventArgs^>^ value);
	void remove (EventHandler<ViewActivatedEventArgs^>^ value);
}

Remarks

This event is raised immediately after Revit has finished activating a view of the document. It is raised even when view activating failed or was cancelled (during ViewActivating event).

Check the 'Status' field in event's argument to see whether the action itself was successful or not.

This event is not cancellable, for the process of view activating has already been finished.

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.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →