FamSlide — live parameter sliders for the Family Editor#3489
FamSlide — live parameter sliders for the Family Editor#3489Wurschdhaud wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new pyRevitTools Family Editor utility (“FamSlide”) that provides a modeless WPF panel for interactively editing family parameters (sliders/checkboxes/text) with localized UI strings and a couple of bulk actions.
Changes:
- Introduces the FamSlide modeless WPF window and Revit event wiring to keep the parameter list in sync.
- Adds parameter discovery/classification utilities plus bulk actions (shuffle values, delete unused).
- Adds 8-language localization resources and registers the new pushbutton in the Family pulldown.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/script.py | Main modeless WPF UI + event hooks + commit logic for parameter edits. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.xaml | XAML layout for the FamSlide window. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.en_us.xaml | English UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.ko.xaml | Korean UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.fr_fr.xaml | French UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.ru.xaml | Russian UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.chinese_s.xaml | Simplified Chinese UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.es_es.xaml | Spanish UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.de_de.xaml | German UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/FamSlideWindow.ResourceDictionary.pt_br.xaml | Brazilian Portuguese UI string resources for in-panel localization. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/famslide_paramutils.py | Parameter scanning/classification/tagging and default slider ranges. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/famslide_actions.py | Bulk actions: shuffle values and delete unused parameters. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/FamSlide.pushbutton/bundle.yaml | Pushbutton metadata, localized tooltip, and persistent engine requirement. |
| extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Family.pulldown/bundle.yaml | Adds FamSlide to the Family pulldown layout. |
There was a problem hiding this comment.
PR Summary:
- Adds FamSlide, a modeless WPF panel exposing live sliders/checkboxes/textboxes bound to the active family's parameters in the Family Editor.
- Reactive refresh on
doc-changed/view-activated/doc-opened, plus "shuffle all values" and "delete unused parameters" bulk actions (transaction-wrapped, confirmed viaforms.alert). - Full 8-locale localization for bundle metadata and in-panel UI strings via
ResourceDictionaryXAML files.
Review Summary:
Reviewed script.py, famslide_paramutils.py, famslide_actions.py, bundle.yaml, and the XAML/localization files. The pyrevit.revit.events.execute_in_revit_context bridging pattern and the module-level ui = None + engine: persistent: true singleton idiom are used correctly and match established, shipping precedent in this repo (e.g. Keynotes.pushbutton), so those were not flagged. Localization keys are consistent across all 8 locale files. Found two real gaps in Revit-API-context/state handling:
fm.CurrentTypecan beNonefor a family with no defined types yet — unguarded, this crashesrefresh_from_document/_build_row(precedent:Cycle Family Types.pushbuttonexplicitly checks for this).on_toggle_editable_click/on_toggle_labels_clickreadrevit.doc/doc.FamilyManagerdirectly from a plain button-click handler, breaking the file's own convention of bridging all document access throughexecute_in_revit_context.
No IronPython 2.7/PEP8/black-formatting violations were spotted (no f-strings, no Py3-only syntax, consistent .format() usage).
Suggestions
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
What this is
FamSlide gives you a modeless panel of sliders / checkboxes / textboxes bound
to the active family's parameters, so you can see how the model reacts to
parameter changes (shape changes, constraint errors, etc.) without
round-tripping through the Family Types dialog every time. It also has
one-click "shuffle all values" and "delete unused parameters" utilities.
This is effectively a reimplementation of Archilizer's Family Editor
Interface, which unfortunately hasn't been updated
for Revit versions newer than 2024. Credit to Archilizer for the original
concept and UX — this tool exists to keep that workflow alive on current
Revit.
What's in this PR
doc-changed/view-activated/doc-openedso the parameter list stays in sync as you edit, undo/redo, orswitch between open families.
in use,uFused-in-formula,
dFdriven-by-formula,built-in,instance/type,associated).wrapped in a single transaction.
en_us,ko,fr_fr,ru,chinese_s,es_es,de_de,pt_br) for both bundle metadata and in-panel UI text.Screenshots / recording
Recording.2026-07-16.094834.mp4
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}