Bring standard development ecosystems into live Autodesk CAD/BIM hosts — without replacing them.
RevitDevTool is a development platform for .NET-based CAD/BIM applications. Run Python/C#/F# scripts, connect AI assistants, and execute tests against live host instances, all from a single toolkit. Currently supports Revit and AutoCAD-family — designed to extend to any .NET-capable host.
For developers and researchers who need:
- Modern Python — CPython 3.14 with full ecosystem (pandas, numpy, scikit-learn, AI/ML)
- VSCode Debugging — Set breakpoints, step through code, inspect Revit/AutoCAD API objects
- Zero-friction dependencies — Declare packages inline (PEP 723), auto-install with Pixi
- AI-powered workflows — Model Context Protocol (MCP) integration for AI assistants
- Remote testing — pytest bridge runs tests inside live Revit/AutoCAD/Civil3D
- Multiple script runtimes — CPython, IronPython (pyRevit), C#
.csx, F#.fsx - 3D Visualization — Render geometry directly in Revit view (Revit host)
- Real-time logging — Color-coded output with stack traces and JSON formatting
| Host | Versions | Python | .NET | MCP | PyTest | Visualization |
|---|---|---|---|---|---|---|
| Revit | 2022–2027 | CPython 3.14 | C# / F# / Assembly | Full | Full | DirectContext3D |
| AutoCAD | 2022–2027 | CPython 3.14 | C# / Assembly | Full | Full | — |
| Civil 3D | 2022–2027 | CPython 3.14 | C# / Assembly | Full | Full | — |
| Plant 3D | 2022–2027 | CPython 3.14 | C# / Assembly | Full | Full | — |
AutoCAD-family hosts (Civil 3D, Plant 3D, AutoCAD Architecture, MEP, Electrical, Mechanical, Map 3D) share the same add-in and feature set.
Set breakpoints, inspect variables, step through Revit API calls in real-time.
Declare packages inline. Pixi auto-installs. No manual pip, no venv setup.
# /// script
# dependencies = ["pandas==2.1.0", "numpy>=1.24"]
# ///
from Autodesk.Revit import DB
doc = __revit__.ActiveUIDocument.Document
walls = DB.FilteredElementCollector(doc).OfClass(DB.Wall)
data = [{"Name": w.Name, "Area": w.Area} for w in walls]
df = pd.DataFrame(data)
print(df.groupby("Level").agg({"Area": ["sum", "mean"]}))Monitor output with color coding, JSON formatting, and Python stack traces.
Render curves, faces, solids directly in Revit view without creating model elements.
ref = uidoc.Selection.PickObject(ObjectType.Edge)
edge = elem.GetGeometryObjectFromReference(ref)
print(edge) # Renders in 3D viewDownload and run the MSI installer from Releases.
Create hello.script.py:
# /// script
# dependencies = []
# ///
from Autodesk.Revit import DB
doc = __revit__.ActiveUIDocument.Document
walls = DB.FilteredElementCollector(doc).OfClass(DB.Wall)
print(f"Found {walls.GetElementCount()} walls")- Open RevitDevTool panel in Revit (or AutoCAD)
- Load folder containing your script
- Click Execute
- See output in Trace panel
Complete Getting Started Guide · Documentation site
- CPython 3.14 with full ecosystem access
- PEP 723 inline dependencies — no separate requirements.txt
- Pixi resolver — automatic package installation with conda-forge + PyPI
- VSCode debugger — full IDE debugging with breakpoints
- Module isolation — clean cache between runs
- Type stubs — full Revit/AutoCAD API autocomplete in IDE
- IExternalCommand discovery — automatic command detection
- FileWatcher — auto-reload on assembly changes
- Dependency loading — all DLLs loaded automatically
- C# / F# scripts — Roslyn-based script execution
- Model Context Protocol — AI assistants interact with live host instances
- Multi-host discovery —
DevTools.Daemontray app finds all running hosts - Built-in tools —
list_processes,launch_host,code_mode - Custom toolsets — Python/C# MCP tools registered via file convention
- Works with — Cursor, Claude Desktop, VS Code Copilot, any MCP client
- Architecture docs: MCP Architecture
- pytest bridge — run tests inside live host processes via Named Pipe
- Multi-host —
--host revit,--host autocad,--host civil3d - Auto-discovery — finds running host instances automatically
- Auto-launch — spawns host process if needed
- IDE integration — VS Code, Cursor, PyCharm test runners
- Separate repo:
RevitDevTool.PyTest| PyPI:revitdevtool_pytest - Architecture docs: Pytest Bridge
- Multi-source capture — Trace, Console, Debug, Python print
- Syntax highlighting — automatic color coding by keywords
- JSON formatting — pretty-print with syntax highlighting
- Stack traces — Python exception formatting with file links
- Geometry interception — auto-visualize printed geometry (Revit)
- DirectContext3D — transient rendering (no model elements)
- Multiple geometry types — curves, faces, solids, meshes, points, bounding boxes
- Thread-safe — buffered rendering from any thread
- Performance optimized — caching and batch updates
| Aspect | RevitDevTool | pyRevit |
|---|---|---|
| Target User | Developers & researchers | End users |
| Hosts | Revit + AutoCAD family | Revit only |
| Python | CPython 3.14 | IronPython 2.7 (default) |
| Packages | Full ecosystem (pandas, numpy, AI/ML) | Limited (Revit API only) |
| Dependencies | Automatic (PEP 723 + Pixi) | Manual pip install |
| Debugging | VSCode (full IDE) | pdb (command-line) |
| AI Integration | MCP protocol | — |
| Testing | pytest bridge | — |
| Best For | Development, research, data science | Ribbon automation for teams |
| Tool | Python | Auto-deps | Debugger | AI (MCP) | Best For |
|---|---|---|---|---|---|
| pyRevit | IronPython 2.7 | — | — | — | End-user automation |
| Dynamo | CPython 3.9 | — | — | — | Visual programming |
| RevitDevTool | CPython 3.14 | Pixi | VSCode | Full | Development & research |
- Autodesk Revit 2022–2027 and/or AutoCAD-family 2022–2027
- Windows 10/11
- .NET Framework 4.8 (Revit 2022–2024), .NET 8.0 (2025–2026), .NET 10.0 (2027)
- Download MSI installer from Releases
- Run installer (admin rights required)
- Launch Revit or AutoCAD
- Find RevitDevTool in the ribbon
|
|
- .NET 10.0 SDK (via
global.json)
git clone https://github.com/trgiangv/RevitDevTool.git
cd RevitDevTool
# Stop that host year, then build and deploy
scripts/build-host.ps1 -HostApp Revit -Year 2025
# Several hosts and years (one year after another)
scripts/build-host.ps1 -HostApp Revit,AutoCAD -Year 2025,2026 -Mode Release
# Or build the solution directly
dotnet build RevitDevTool.slnx -c "Debug.Autodesk.2025"Available configurations: Debug.Autodesk.2022 through Debug.Autodesk.2027, Release.Autodesk.2022 through Release.Autodesk.2027.
Contributions welcome!
- Read architecture docs — docs/ for the module you're modifying
- Follow design patterns — Provider, Strategy, Composite patterns
- Keep host boundaries — shared platform in
DevTools.*, host-specific inRevitDevTool/AcadDevTool - Update docs — the appropriate repository docs layer and
docs/docs/when user-facing
GitHub Discussions for ideas | GitHub Issues for bugs
Built on the shoulders of giants:
- RevitLookup — DirectContext3D implementation reference
- RevitDevTool (Original) — original project inspiration
- RevitAddinManager — add-in hot reload patterns
- pyRevit — Python integration inspiration
- RevitPythonShell — IronPython scripting environment
- Dynamo — visual programming
- Pixi — fast cross-platform package management
- PythonNet — Python.NET bridge
MIT License — see LICENSE for details.
- 📖 Documentation — Docusaurus documentation site
- 🐛 Bug Reports — GitHub Issues
- 💡 Feature Requests — GitHub Discussions
- ❓ Questions — GitHub Discussions
Made with ❤️ for the CAD/BIM developer community ⭐ Star this repo if you find it useful!