Pyrevit Forms < WORKING | 2026 >

Revit's native API offers limited UI capabilities. pyRevit Forms bridge this gap, allowing scripters and developers to:

if selected: print("You selected {} sheets.".format(len(selected)))

| Form Type | Function | Typical Use | |-----------|----------|--------------| | Alert | forms.alert | Warning/error messages | | Confirm | forms.alert (with yes_no=True ) | Yes/No decisions | | Progress Bar | forms.ProgressBar | Long operations feedback | | TaskDialog | forms.taskdialog | Rich, command-link dialogs | | SelectFromList | forms.SelectFromList | Choose from collection | | FlexForm | forms.FlexForm | Custom multi-control layouts | pyrevit forms

Revit Development Teams / BIM Automation Specialists Date: [Current Date] Version: pyRevit 4.x (compatible with Revit 2019–2025)

pyRevit Forms leverage the (specifically System.Windows.Forms ) via Python's clr (Common Language Runtime) integration. Key characteristics: Revit's native API offers limited UI capabilities

| Control | pyRevit Function | Purpose | |---------|----------------|---------| | TextBox | forms.TextBox | Single-line text/number input | | ComboBox | forms.Combobox | Dropdown selection | | ListBox | forms.ListBox | Multi-item selectable list | | CheckBox | forms.CheckBox | Boolean option | | RadioButton | forms.RadioButton | Mutually exclusive options | | Button | forms.Button | Action trigger |

: A markup file (e.g., MyPanel.xaml ) that defines the visual layout—buttons, text boxes, and sliders. When standard forms are insufficient, you can create

When standard forms are insufficient, you can create fully custom UIs using WPF. This requires two main components: