ApplicationDocumentOpening Event |
Subscribe to the DocumentOpening event to be notified when Revit is just about to open a document.
Namespace: Autodesk.Revit.ApplicationServicesAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic event EventHandler<DocumentOpeningEventArgs> DocumentOpening
Public Event DocumentOpening As EventHandler(Of DocumentOpeningEventArgs)
public:
event EventHandler<DocumentOpeningEventArgs^>^ DocumentOpening {
void add (EventHandler<DocumentOpeningEventArgs^>^ value);
void remove (EventHandler<DocumentOpeningEventArgs^>^ value);
}
member DocumentOpening : IEvent<EventHandler<DocumentOpeningEventArgs>,
DocumentOpeningEventArgs>
Value
EventHandlerDocumentOpeningEventArgs
RemarksThis 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