Add SwichDesign automatic dimensions extension#3492
Conversation
Add SwichDesign.extension with automatic dimensioning for Revit. Includes three main library modules (geometry, revit_io, standards) providing pure geometry algorithms, Revit API integration, and US architectural dimensioning standards. The main button implements exterior (multi-tier wall/opening dimensions) and interior (room-driven) dimensioning modes with support for angled buildings via frame transformations, core/finish face selection, and opening dimensioning modes. Update .gitignore to allow this extension in the repository.
|
Unable to trigger custom agent "Code Reviewer". You have run out of credits 😔 |
There was a problem hiding this comment.
Pull request overview
Adds a new SwichDesign.extension button under the main pyRevit tab to automatically place exterior and interior dimension strings in Revit floor plans, backed by a small internal library split into geometry (pure algorithms), Revit API I/O, and dimensioning standards.
Changes:
- Introduces the Automatic Dimensions pushbutton script with exterior (multi-tier) and interior (room-driven) modes plus a WPF configuration dialog.
- Adds
autodimswichdesignhelper modules for geometry processing, Revit element/reference discovery, and US-style dimension spacing/formatting rules. - Provides a localized
bundle.yamltooltip/title describing usage and behavior.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/SwichDesign.extension/pyRevit.tab/Drawing Set.panel/Automatic Dimensions.pushbutton/script.py | Main tool entrypoint, UI wiring, and exterior/interior dimension placement logic |
| extensions/SwichDesign.extension/pyRevit.tab/Drawing Set.panel/Automatic Dimensions.pushbutton/bundle.yaml | Button metadata + localized tooltip/help text |
| extensions/SwichDesign.extension/pyRevit.tab/Drawing Set.panel/Automatic Dimensions.pushbutton/AutoDimWindow.xaml | WPF dialog for mode/options (core/finish, RO/CL, offsets, dry run) |
| extensions/SwichDesign.extension/lib/autodimswichdesign/standards.py | Dimension spacing presets + parsing/formatting helpers |
| extensions/SwichDesign.extension/lib/autodimswichdesign/revit_io.py | Revit API integration for walls/openings/rooms/faces and dimension creation |
| extensions/SwichDesign.extension/lib/autodimswichdesign/geometry.py | Pure geometry pipeline (segment ordering/splitting, tier building, room polygon math) |
| extensions/SwichDesign.extension/lib/autodimswichdesign/init.py | Package marker for autodimswichdesign |
| ENGINE: IronPython (pyRevit default - NO python3 shebang; CPython engine | ||
| is broken in this environment, PROJECT_BRIEF.md sections 13-16). |
There was a problem hiding this comment.
Project Brief was used for internal developing process and is not required for plugin operation
| # -*- coding: utf-8 -*- | ||
| """Pure geometry logic for the Automatic Dimensions rules. | ||
|
|
||
| Zero Revit dependency - unit-tested anywhere (tests/test_geometry.py). |
There was a problem hiding this comment.
"Dry run" feature the testing and the ability o run the code without populating the model - testing for issues with the model geometry that might lead to failure
Removal of text pointing to internal document Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
General opinion:
|
|
@Swichllc I agree with @Wurschdhaud comments and more importantly on
|
automatic dimensions extension
Description
Added SwichDesign.extension with automatic dimensioning for Revit. Includes three main library modules (geometry, revit_io, standards) providing pure geometry algorithms, Revit API integration, and US architectural dimensioning standards. The main button implements exterior (multi-tier wall/opening dimensions) and interior (room-driven) dimensioning modes with support for angled buildings via frame transformations, core/finish face selection, and opening dimensioning modes.
Checklist
Need community help with testing, UI and the extension location
USER_GUIDE.md
in the main pyrevit tab
Additional Notes
Include any additional context, screenshots, or considerations for reviewers.
Auto.Dim.v3.mp4
Thank you for contributing to pyRevit! 🎉