DialogBoxShowing Event


Subscribe to the DialogBoxShowing event to be notified when Revit is just about to show a dialog box or a message box.

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

Syntax

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

Remarks

This event is raised when Revit is just about to show a dialog box or a message box.

Event is not cancellable. The 'Cancellable' property of event's argument is always False.

Depending on the type of the dialog that is being shown, the event's argument's type varies as follows: When it is a dialog box, the event's argument is an object of DialogBoxShowingEventArgs . When it is a message box, the event's argument is an object of MessageBoxShowingEventArgs ,which is subclass of DialogBoxShowingEventArgs. When it is a task dialog, the event's argument is an object of TaskDialogShowingEventArgs ,which is subclass of DialogBoxShowingEventArgs.

No 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