-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Comprehensive developer toolkit for Autodesk Revit (2022-2026) with code execution, visualization, and logging capabilities.

Essential shortcuts for rapid development:
-
Press
ADβ Re-run last script + show Trace Panel - Ctrl + Click Trace Panel button β Toggle panel visibility
- F5 in VSCode β Attach debugger for breakpoint debugging
Basic workflow:
1. Click script in CodeExecute β First execution
2. Edit code in your IDE
3. Press AD β See updated results
4. Repeat steps 2-3 for rapid iteration
Debugging workflow:
1. Set breakpoints in VSCode
2. Press F5 β Attach to Revit Python
3. Execute script in RevitDevTool
4. Debugger pauses at breakpoints
5. Inspect variables, step through code
π‘ Tip: Use AD shortcut for rapid iteration during development!
π Debug Status: Check the indicator in Trace panel toolbar:
- π΄ Red dot = Debugger not connected
- π’ Green dot = VSCode debugger attached
Access RevitDevTool settings from the dockable panel to configure themes, logging, visualization, and code execution behavior:

RevitDevTool consists of three modules working together to provide a complete development environment within Revit:
π CodeExecute
Multi-language code execution framework
- Execute Python 3.13 scripts with CPython + PythonNet3
- Automatic dependency management with PEP 723 metadata
- VSCode debugger integration with breakpoints and variable inspection
- .NET hot-reload (no temp folder copying)
- File watcher for instant reload
- Hierarchical tree organization
Use when: You need to run custom scripts or commands in Revit with automatic dependency installation.
Learn more: CodeExecute Overview β’ Python Runtime β’ Python Debugging
π Logging
Unified logging infrastructure
- Multi-sink output (UI RichTextBox + File logging)
- Revit context enrichment (version, document, user info)
- Filter keywords for log level detection
- Pretty JSON output and WPF trace support
- Syntax highlighting with keyword detection
- Geometry interception β automatic visualization
- Python stack trace formatting
Use when: You need structured logging with visual feedback and geometry visualization.
Learn more: Logging Overview β’ Color Keywords
π¨ Visualization
Real-time 3D geometry rendering
- DirectContext3D transient rendering (no model elements)
- Support for curves, faces, solids, meshes, points, bounding boxes
- Thread-safe buffering
- Performance optimization with caching
- Transparent rendering
Use when: You need to visualize geometry without creating model elements.
Learn more: Visualization Overview β’ Geometry Types

flowchart TD
UI[User Interaction<br/>Execute script, visualize geometry, view logs]
UI --> CE[CodeExecute Module<br/>β’ Discovers Python scripts and .NET assemblies<br/>β’ Manages dependencies PEP 723<br/>β’ Executes code in Revit context]
CE --> Output[Code execution output]
Output --> Logging[Logging Module<br/>β’ Captures output<br/>β’ Applies themes<br/>β’ Routes to sinks]
Output --> Viz[Visualization Module<br/>β’ Renders 3D<br/>β’ DirectContext3D<br/>β’ Buffer management]
Logging <-->|Geometry?| Viz
Logging --> TracePanel[Trace Panel<br/>with colors]
Viz --> View3D[3D View<br/>with geometry]
Python script with all three modules:
# /// script
# dependencies = ["polars==1.38.1"]
# ///
import polars as pl
from Autodesk.Revit.DB import FilteredElementCollector, Wall
# CodeExecute: Manages dependencies and execution
doc = __revit__.ActiveUIDocument.Document
walls = FilteredElementCollector(doc).OfClass(Wall).ToElements()
# Logging: Captures and displays output
print(f"Found {len(list(walls))} walls")
# Visualization: Renders geometry in 3D view
for wall in walls:
curve = wall.Location.Curve
print(curve) # Geometry automatically visualized
print("Analysis complete β")What happens:
- CodeExecute discovers script, installs polars, executes code
- Logging captures print() calls β Trace panel with syntax highlighting
- Logging intercepts print(geometry) β routes to Visualization
- Visualization renders curves in 3D via DirectContext3D
- User sees both text output and visual output
More examples: Examples Overview
- Data Analysis - Collect β analyze β visualize
- Curve Visualization - Pick & display curves
- Logging Format - Syntax highlighting tests
- Python Dashboard - WebView2 dashboard with charts (PythonDemo)
| I want to... | Go to... |
|---|---|
| Execute a Python script | CodeExecute Overview |
| Auto-install dependencies | Python Runtime |
| Debug Python with VSCode | Python Debugging |
| Compare Python options | Python Ecosystems |
| See trace output with colors | Logging Overview |
| Visualize geometry in 3D | Visualization Overview |
| Format JSON output | Logging Overview |
| Use Python stack traces | Python Stack Traces |
| Generate type stubs | Stub Generation |
| Understand .NET execution | .NET Runtime |
| Compare vs pyRevit | vs pyRevit |
- CodeExecute - Python & .NET execution
- Logging - Logging system
- Visualization - Geometry visualization
- vs pyRevit - Python execution comparison
- Python Ecosystems - IronPython vs CPython vs PythonNet3
For developers contributing to RevitDevTool, see architecture documentation in the main repository:
RevitDevTool works with multiple programming languages:
- Python 3.13 - Full support via CPython + PythonNet3
- C# - Full support through .NET Trace API
- IronPython - Legacy support for pyRevit/RevitPythonShell scripts
- Any .NET Language - F#, VB.NET, etc.
- Download the latest release from GitHub Releases
- Run the MSI installer
- Launch Revit (2022-2026)
- Open the RevitDevTool panel from External Tools ribbon
- Main Repository: RevitDevTool
- Issues: Report bugs or request features
- Discussions: Ask questions
MIT License - See LICENSE in main repository.