This link has a ton of information regarding the TaskDialog
class in the Revit API.
With that in mind we can use the logic there to access the built-in message box icons.
Resulting in:
–
and the new python code:
import clr
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import TaskDialog, TaskDialogCommonButtons, TaskDialogResult, TaskDialogCommandLinkId, TaskDialogIcon
mainDialog = TaskDialog("bla bla bla")
mainDialog.MainInstruction = "bla bla bla "
mainDialog.MainContent = """bla bla bla"""
mainDialog.MainIcon = TaskDialogIcon.TaskDialogIconShield
mainDialog.CommonButtons = TaskDialogCommonButtons.Close;
mainDialog.DefaultButton = TaskDialogResult.Close;
mainDialog.FooterText = "bla bla bla"
tResult = mainDialog.Show()
OUT = tResult