Developer Guide
Welcome to the DB Tools Developer Guide. This documentation is intended for developers working on the DBTools codebase or building integrations.
Quick Navigation
| Section | Description |
|---|---|
| Architecture | System design, build pipeline, project structure |
| Projects | Deep dives into each project |
| Tools (Technical) | Internal tool implementation details |
| Developing | Guides for creating new tools |
Getting Started
Prerequisites
- Visual Studio 2022 or later
- .NET SDK 8.0+
- Revit 2024, 2025, or 2026
Building
# From repository root
bash build.sh
# Or for a specific Revit year
bash build.sh -y 2025 BuildAll
Testing
# Run Revit integration tests
bash invoke-revit-tests.sh --smart --tool GM
# Run headless tests
dotnet test testing/DBTools.BuildArtifacts.Tests/DBTools.BuildArtifacts.Tests.csproj -c Release
Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ Revit │
├─────────────────────────────────────────────────────────────┤
│ DBTools.Loader │
│ (Revit Add-in Entry Point) │
├─────────────────────────────────────────────────────────────┤
│ DBTools.App │
│ (Application Shell, Ribbon UI) │
├──────────────┬──────────────┬──────────────┬────────────────┤
│ GM Tool │ SGT Tool │ Other Tools │ Settings │
├──────────────┴──────────────┴──────────────┴────────────────┤
│ DBTools.Core │
│ (Shared Infrastructure, Transactions, UI) │
├─────────────────────────────────────────────────────────────┤
│ DBTools.Themes │
│ (UI Theming System) │
└─────────────────────────────────────────────────────────────┘
Key Concepts
Manifest-Driven Tools
Each tool declares its configuration via manifest.yml:
- Ribbon button definitions
- Command types and availability
- Settings schemas
- Sandbox windows for validation
Single-DLL Deployment
All tool code compiles into DBTools.dll via MSBuild file-linking. Dependencies are embedded as resources and extracted at runtime.
Window-Scoped Theming
WPF themes apply at window level (not application level) to avoid conflicts with other Revit add-ins.
Documentation Sections
Architecture
- System Overview
- Build Pipeline
- Test Pipeline
- Project References
- ILRepack & Embedding
- Sandbox Validator
- Theme System
Projects
Tools (Technical)
Internal implementation details for each tool.
Developing
- Creating New Tools
- Leveraging Modularity
- Settings Packs (coming soon)
- Feature Warnings (coming soon)
- Hooks (coming soon)
- Sandbox Integration (coming soon)
- Testing Tools (coming soon)
Troubleshooting
See Troubleshooting for common issues and solutions.