OverrideResult Method


Call this method to cause the Autodesk Revit dialog to be dismissed with the specified return value.

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

Syntax

C#
public bool OverrideResult(
	int resultCode
)
Visual Basic
Public Function OverrideResult ( _
	resultCode As Integer _
) As Boolean
Visual C++
public:
bool OverrideResult(
	int resultCode
)

Parameters

resultCode
Type: System Int32
The result code you wish the Revit dialog to return.

Return Value

True if the result code was accepted.

Remarks

The range of valid result values depends on the type of dialog as follows:
  1. DialogBox: Any non-zero value will cause a dialog to be dismissed.
  2. 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.
  3. 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