ApplicationDocumentOpening Event

Subscribe to the DocumentOpening event to be notified when Revit is just about to open a document.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public event EventHandler<DocumentOpeningEventArgs> DocumentOpening

Value

EventHandlerDocumentOpeningEventArgs
Remarks

This event is raised when Revit is just about to open a document.

Event is cancellable. To cancel it, call the 'Cancel()' method in event's argument to True. Your application is responsible for providing feedback to the user about the reason for the cancellation.

The document cannot be modified, for it is not opened yet at the time of the event.

Another DocumentOpened event will be raised immediately after document is opened.

See Also