smit8462
(Smit)
August 13, 2026, 8:58am
1
Hello guys,
Currently, only a “Warning” icon can be assigned in forms.alert. Revit API already includes “Shield”, “Information” and “Error” icons in TaskDialogIcon enum TaskDialog Class .
It would be helpful to have user choice of selecting “Shield”, “Information” and “Error” icons in forms.alert.
smit8462
(Smit)
August 13, 2026, 9:57am
2
I have raised the issue on Github
opened 09:53AM - 13 Aug 26 UTC
New Feature
## Is your feature request related to a problem? Please describe
`forms.alert()`… currently exposes "Warning" icon or no icon available on Revit's native `TaskDialog` class. The Revit API's `TaskDialogIcon` enum includes `TaskDialogIconShield`, `TaskDialogIconInformation`, and `TaskDialogIconError`, but these aren't currently exposed and mapped through pyRevit's forms module. This limits the visual feedback options available to users.
For example, there's no clean way to show a plain "Information" icon.
There are some situations where I want to use "Information" icon in `forms.alert`, but only "Warning" or "No" icon is available
## Describe the solution you'd like
Add support for the `Shield`, `Information`, and `Error` icons from Revit API's `TaskDialogIcon` enum to pyRevit's `forms.alert()` (and any other wrappers around `TaskDialog`), so they can be selected the same way existing icons are, e.g.:
```python
forms.alert("Are you sure you want to proceed?", icon="shield")
forms.alert("Operation completed successfully.", icon="information")
forms.alert("Something went wrong.", icon="error")
forms.alert("Warning! Element already has value", icon="warning"
```
This would likely involve extending the icon-mapping logic in `pyrevitlib/pyrevit/forms/` to include these additional `TaskDialogIcon` enum values and documenting the new options.
## Describe alternatives you've considered
- Manually using `TaskDialog` class directly instead of `forms.alert()`, bypassing pyRevit's wrapper. It works, but loses the convenience pyRevit's `forms` module provides.
## Additional context
Reference: [TaskDialog Class / TaskDialogIcon Enumeration - Revit API Docs 2026](https://www.revitapidocs.com/2026/6c3246ba-2a00-386e-1ec4-39cdb7ad664e.htm)
Happy to submit a PR for this once the approach is agreed on. No C# build required.