DialogBoxShowingEventArgsOverrideResult Method |
Call this method to cause the Autodesk Revit dialog to be dismissed with the specified return value.
Namespace: Autodesk.Revit.UI.EventsAssembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic bool OverrideResult(
int resultCode
)
Public Function OverrideResult (
resultCode As Integer
) As Boolean
public:
bool OverrideResult(
int resultCode
)
member OverrideResult :
resultCode : int -> bool
Parameters
- resultCode Int32
-
The result code you wish the Revit dialog to return.
Return Value
Boolean
True if the result code was accepted.
Remarks
The range of valid result values depends on the type of dialog as follows:
-
DialogBox: Any non-zero value will cause a dialog to be dismissed.
-
MessageBox: Standard Message Box IDs, such as IDOK and IDCANCEL, are accepted.
For all possible IDs, refer to the Windows API documentation.
The ID used must be relevant to the buttons in a message box.
-
TaskDialog: Standard Message Box IDs and Revit Custom IDs are accepted,
depending on the buttons used in a dialog. Standard buttons, such as OK
and Cancel, have standard IDs described in Windows API documentation.
Buttons with custom text have custom IDs with incremental values
starting at 1001 for the left-most or top-most button in a task dialog.
See Also