Revit 2025.3 API
Message |
The event arguments used by the DialogBoxShowing event when a Windows message box is about to be displayed in Revit.

SystemObject
SystemEventArgs
Autodesk.Revit.DB.EventsRevitAPIEventArgs
Autodesk.Revit.DB.EventsRevitAPIPreEventArgs
Autodesk.Revit.UI.EventsDialogBoxShowingEventArgs
Autodesk.Revit.UI.EventsMessageBoxShowingEventArgs
SystemEventArgs
Autodesk.Revit.DB.EventsRevitAPIEventArgs
Autodesk.Revit.DB.EventsRevitAPIPreEventArgs
Autodesk.Revit.UI.EventsDialogBoxShowingEventArgs
Autodesk.Revit.UI.EventsMessageBoxShowingEventArgs
Namespace: Autodesk.Revit.UI.Events
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public class MessageBoxShowingEventArgs : DialogBoxShowingEventArgs
Public Class MessageBoxShowingEventArgs Inherits DialogBoxShowingEventArgs
public ref class MessageBoxShowingEventArgs : public DialogBoxShowingEventArgs
type MessageBoxShowingEventArgs = class inherit DialogBoxShowingEventArgs end
The MessageBoxShowingEventArgs type exposes the following members.

Name | Description | |
---|---|---|
![]() | Cancellable |
Indicates whether an event may be cancelled by an event delegate.
(Inherited from RevitAPIEventArgs) |
![]() | DialogId |
A unique string identifier for DialogBox and TaskDialog type dialogs in Revit.
(Inherited from DialogBoxShowingEventArgs) |
![]() | DialogType | An integer that describes the standard Windows type of the dialog box. |
![]() | IsValidObject |
Specifies whether the .NET object represents a valid Revit entity.
(Inherited from RevitAPIEventArgs) |
![]() | Message | The message that has been displayed in the dialog box. |

Name | Description | |
---|---|---|
![]() | Cancel |
When the event is cancellable, may call the Cancel() method to cancel it.
(Inherited from RevitAPIPreEventArgs) |
![]() | Dispose | (Inherited from RevitAPIEventArgs) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | IsCancelled |
Indicates whether the event is being cancelled.
(Inherited from RevitAPIEventArgs) |
![]() | OverrideResult |
Call this method to cause the Autodesk Revit dialog to be dismissed with the specified return value.
(Inherited from DialogBoxShowingEventArgs) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |

When the application receives this object, a simple message box is about to be displayed in Revit that
requires user interaction. The OverrideResult function can be used to cause the dialog
to be dismissed and return a desired result code.
See Also