Table of Contents

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

Projects

Tools (Technical)

Internal implementation details for each tool.

Developing

Troubleshooting

See Troubleshooting for common issues and solutions.