pyByggstyrning is a pyRevit extension designed to enhance Revit workflows with some specialized tools for use in model based construction.
- MMI Panel: Tools for quickly setting MMI statuses on selected elements. Includes Settings for configuring MMI parameters and Monitor for automatic MMI validation, element protection, and post-sync MMI verification.
- Project Browser Panel: Enhanced tools for navigating and managing views and filters, credits to Giuseppe Dotto. Includes IFC Classification tools for automated element type classification using webcrawling, machine learning and rule-based defaults.
- StreamBIM Panel: Tools for StreamBIM projects for importing checklist values from site to Revit.
- View Panel: Color Elements tool that can help you quickly identify and select elements based on parameter values.
- Quick access to MMI in the Modify tab: The startup.py script clones the MMI Panel into the Modify tab in Revit upon startup and document opening, providing easy access when elements are selected.
- MMI Settings Tool: Configure which parameter is used for MMI values and adjust monitoring options including automatic validation, element pinning, movement warnings for elements with high MMI values, and post-synchronization MMI verification.
- MMI Monitor: Live background monitor that can automatically validate and correct MMI values, pin elements with MMI values above 400, warn users when they attempt to move elements with high MMI status, and verify MMI compliance on user-owned elements after synchronization with central.
- Post-Sync MMI Verification: Automatically checks MMI parameters on user-owned model elements after synchronizing with central in workshared models. Creates a dedicated 3D view highlighting elements with missing or invalid MMI values, ensuring quality control in collaborative workflows.
- StreamBIM API utilities: Utilities for interacting with StreamBIM API, including authentication, project management, and checklist item retrieval. StreamBIM utilities.
- Batch Importer tool: The StreamBIM Checklist import can be automated using the 'pyrevit run' command to start revit and execute the 'Run Everything' script, this can be schedules using the .bat located in the tool folder. For more, checkout the Batch Importer Tool.
- HTTP API for Element Selection (Switchback): The
startup.pyalso sets up an HTTP endpoint using pyRevit Routes. This allows external applications or developers to select and zoom to a specific element in Revit by its ID via a simple web request.- Usage (GET Request):
http://<revit-machine-ip>:<port>/switchback/id/<element_id> - Example:
http://localhost:48884/switchback/id/2099173(Port may vary based on pyRevit configuration) - Documentation: For more details on pyRevit Routes, see the official documentation.
- Usage (GET Request):
- IFC Classification Tools: Automated tools for classifying Revit element types to IFC classes, making IFC export preparation faster and more accurate.
- Load Type Defaults: Applies standard IFC classifications from an Excel file to element types based on their Revit category, providing a quick way to set up baseline IFC mappings. This tool runs entirely locally without external API calls.
- Quick Class: Uses machine learning (CatBoost API) to intelligently classify element types based on category, family, type name, and manufacturer information. Falls back to rule-based classification if the API is unavailable.
- Class Crawler: Sends element types from the active view to Byggstyrning's classification service that uses n8n together with Perplexity search to analyze and displays detailed classification results.
⚠️ Data Privacy Note: Both Quick Class and Class Crawler send family type metadata (Category name, Family name, Type name, and manufacturer) to external classification APIs (n8n.byggstyrning.se). No project-specific information, geometry, locations, quantities, or other data is transmitted. Only generic family type information is used for IFC classification purposes.
To use the extension follow the steps:
- Install pyRevit or make sure it's already installed
- Add pyByggstyrning extension:
- Open command prompt (Win + R) => cmd
- Type following command:
pyrevit extend ui pyByggstyrning https://github.com/byggstyrning/pyByggstyrning.extension.git - A tab pyBS should appear on the next start of Revit
Or via the built-in extension manager in pyRevit
Type following command to add support for Switchback: pyrevit configs routes port 48884
Or via pyRevit settings:
demo-color-elements-output.mp4
demo-streambim-checklist-importer-output.mp4
demo-switchback.mp4
- Ehsan Iran-Nejad for developing pyRevit
- Icons8 for its sweet icons
- Erik Frits and the LearnRevitAPI course
- Giuseppe Dotto for the Filters and Views dropdowns from the pyM4B extension.
- khorn06 for the extensible storage library


