The Revit API exposes an event on the UIApplication and UIControlledApplication classes called DialogBoxShowing. Adding an event handler for this event lets the developer automatically handle the dismissal of TaskDialogs. One thing the Revit API documentation does not provide is a list of TaskDialogs and the appropriate responses needed to dismiss them. This class will expose a list of Revit TaskDialogs, along with information about TaskDialogIds, button definitions, and the default button. Class material will cover the process for getting the list of TaskDialogs into a file and an explanation of the file's contents. We will discuss code that can parse the file to show detailed TaskDialog information. We will present a small TaskDialog API that lets the developer easily control the behavior of TaskDialogs in an on-the-fly manner. Additionally, we will show a sample DialogBoxShowing event handler.
- Learn how to create a text file containing Revit TaskDialog information
- Learn how to parse the text file to expose relevant information needed to work within the Revit API
- Understand how the TaskDialog API suppresses Revit TaskDialog boxes
- Learn how to implement a DialogBoxShowing event handler using the TaskDialog API
I began using CADD in 1986 using Prime Medusa. I first started with AutoCAD in 1988 with version 2.6. I have written programs for AutoCAD in Autolisp, C/C++, Visual Basic and .NET. I have been developing add-ins for Revit since Revit 2009 using .NET.