← eliuthchaverojasso.com

Revit API

Revit API engineering — production add-ins, not scripts

A Dynamo graph and a production Revit add-in solve different problems. One is a script that runs once, in a session, with a person watching. The other has to survive host restarts, model corruption, version upgrades and users who never read a release note.

The host, not just the API

Revit's API surface is well documented. What's harder is designing around Revit as a host: a long-running desktop application with its own transaction model, external event queue, document lifecycle and threading rules that don't match typical .NET assumptions. An add-in that ignores this — that treats Document as a database it can query from any thread, for instance — works in a demo and fails intermittently in production.

Multi-version compatibility

Firms don't upgrade Revit in lockstep, and a single project can span years and multiple host versions. Supporting more than one Revit version in one codebase means isolating what changed in the API between versions behind a stable internal interface, so business logic doesn't fork per version — only the thin adapter layer does.

Deterministic QA against a moving model

The model underneath an add-in changes constantly — elements added, deleted, parameters edited, links reloaded. QA has to hold up against that: model-health checks (elements without levels, unconnected fixtures, fixtures missing circuits, panels without upstream sources) need to run reliably regardless of model state, and results need to be reproducible enough that "it worked yesterday" isn't an acceptable QA signal.

Immutable evaluation runs

When an add-in produces a determination — a compliance result, a QA finding — that result needs to be pinned to the exact state of the model it was evaluated against. Otherwise "why did this pass before and fail now" becomes unanswerable. Treating each evaluation as an immutable, timestamped run with its own evidence is what makes the history of a project's compliance status auditable instead of just a live dashboard that overwrites itself.

Release and installer validation

The last mile is unglamorous and where most add-ins actually break in the field: installer behavior across Revit versions, upgrade paths that don't leave orphaned DLLs behind, and a release process that catches a broken build before an engineer mid-deadline hits it. None of the architecture above matters if the thing doesn't install cleanly on the machine actually running the project.

Source

Tests

CI

Package

Installer

Production

Telemetry / Feedback

Stack

C# · .NET · Revit API · WPF/MVVM · CI/CD · installer validation

Where this is applied

The Engineering Intelligence Platform case study covers a production Revit add-in built around exactly these constraints — deterministic QA/QC, multi-version compatibility, and immutable evaluation runs, among the engineering decisions listed there.