# dynamods/dynamorevit architecture

> Architecture diagram of the GitHub repository dynamods/dynamorevit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dynamods/dynamorevit
- Repository: https://github.com/dynamods/dynamorevit

## Overview

Dynamo for Revit is a Revit add-in and a library of Dynamo nodes. Its principal workflow is: Revit loads the add-in, the add-in starts a Revit-aware Dynamo model, and graph nodes read or modify the active Revit document; element wrappers and geometry conversion connect Dynamo values to Revit objects. The README also documents selecting a Dynamo Core runtime, and the tree shows UI controls, graphics, schedules, filters, and broad element coverage. Several subsystem links are based on documented purpose and tree paths; unsampled implementation details are not inferred.

Main entry points: [`src/DynamoRevit/Models/RevitDynamoModel.cs`](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/Models/RevitDynamoModel.cs) (Revit model), [`src/Libraries/RevitNodes/Elements/Element.cs`](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodes/Elements/Element.cs) (Element wrappers), [`src/Libraries/RevitServices/Persistence/DocumentManager.cs`](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/DocumentManager.cs) (Document manager), [`src/DynamoRevit/DynamoRevit.cs`](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/DynamoRevit.cs) (Add-in entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Revit integration"]
  node_addin["Add-in entry<br/>[DynamoRevit.cs]"]
  node_app["Revit app<br/>[DynamoRevitApp.cs]"]
end

subgraph group_model["Dynamo model"]
  node_model["Revit model"]
  node_watch["Revit watch"]
end

subgraph group_services["Revit services"]
  node_documents["Document manager<br/>[DocumentManager.cs]"]
  node_transactions["Transaction manager"]
  node_binder["Element binder<br/>[ElementBinder.cs]"]
  node_lifecycle[("Element lifecycle")]
  node_events["Revit event proxy"]
end

subgraph group_nodes["Revit nodes"]
  node_elements["Element wrappers<br/>[Element.cs]"]
  node_element_catalog["Element node library"]
  node_geometry["Geometry conversion"]
  node_schedules["Schedules and filters"]
  node_graphics["Revit graphics<br/>[GraphicsManager.cs]"]
end

subgraph group_presentation["UI and graphics"]
  node_dropdown["Revit selectors<br/>[RevitDropDown.cs]"]
  node_watch_ui["Revit UI"]
end

node_revit(("Revit host"))
node_core(("Dynamo Core"))

node_revit -->|"loads add-in"| node_addin
node_addin -->|"starts model"| node_model
node_addin -.->|"loads runtime"| node_core
node_addin -->|"uses app services"| node_app
node_model -->|"reads active document"| node_documents
node_model -->|"handles host events"| node_events
node_model -->|"sets watch handler"| node_watch
node_model -->|"coordinates UI"| node_watch_ui
node_model -->|"reconciles elements"| node_elements
node_model -->|"updates host model"| node_revit
node_elements -->|"uses current document"| node_documents
node_elements -->|"manages changes"| node_transactions
node_elements -->|"tracks element trace"| node_binder
node_elements -->|"registers wrappers"| node_lifecycle
node_elements -->|"converts geometry"| node_geometry
node_documents -->|"opens transaction"| node_transactions
node_dropdown -->|"queries document"| node_documents
node_watch -->|"selects elements"| node_documents
node_graphics -->|"renders mesh data"| node_revit

click node_addin "https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/DynamoRevit.cs"
click node_app "https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/DynamoRevitApp.cs"
click node_model "https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/Models/RevitDynamoModel.cs"
click node_watch "https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/ViewModel/RevitWatchHandler.cs"
click node_documents "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/DocumentManager.cs"
click node_transactions "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Transactions/TransactionManager.cs"
click node_binder "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/ElementBinder.cs"
click node_lifecycle "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/ElementIDLifecycleManager.cs"
click node_events "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Events/EventHandlerProxy.cs"
click node_elements "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodes/Elements/Element.cs"
click node_element_catalog "https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/Elements"
click node_geometry "https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/GeometryConversion"
click node_schedules "https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/Schedules"
click node_graphics "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodes/Graphics/GraphicsManager.cs"
click node_dropdown "https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodesUI/RevitDropDown.cs"
click node_watch_ui "https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/ViewModel/DynamoRevitViewModel.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_addin,node_app toneBlue
class node_model,node_watch toneAmber
class node_documents,node_transactions,node_binder,node_lifecycle,node_events toneMint
class node_elements,node_element_catalog,node_geometry,node_schedules,node_graphics toneRose
class node_dropdown,node_watch_ui,node_revit,node_core toneIndigo
```

## Components

### Revit integration

- [Add-in entry](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/DynamoRevit.cs): `src/DynamoRevit/DynamoRevit.cs`
- [Revit app](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/DynamoRevitApp.cs): `src/DynamoRevit/DynamoRevitApp.cs`

### Dynamo model

- [Revit model](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/Models/RevitDynamoModel.cs): `src/DynamoRevit/Models/RevitDynamoModel.cs`
- [Revit watch](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/ViewModel/RevitWatchHandler.cs): `src/DynamoRevit/ViewModel/RevitWatchHandler.cs`

### Revit services

- [Document manager](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/DocumentManager.cs): `src/Libraries/RevitServices/Persistence/DocumentManager.cs`
- [Transaction manager](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Transactions/TransactionManager.cs): `src/Libraries/RevitServices/Transactions/TransactionManager.cs`
- [Element binder](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/ElementBinder.cs): `src/Libraries/RevitServices/Persistence/ElementBinder.cs`
- [Element lifecycle](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Persistence/ElementIDLifecycleManager.cs): `src/Libraries/RevitServices/Persistence/ElementIDLifecycleManager.cs`
- [Revit event proxy](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitServices/Events/EventHandlerProxy.cs): `src/Libraries/RevitServices/Events/EventHandlerProxy.cs`

### Revit nodes

- [Element wrappers](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodes/Elements/Element.cs): `src/Libraries/RevitNodes/Elements/Element.cs`
- [Element node library](https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/Elements): `src/Libraries/RevitNodes/Elements`
- [Geometry conversion](https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/GeometryConversion): `src/Libraries/RevitNodes/GeometryConversion`
- [Schedules and filters](https://github.com/dynamods/dynamorevit/tree/master/src/Libraries/RevitNodes/Schedules): `src/Libraries/RevitNodes/Schedules`
- [Revit graphics](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodes/Graphics/GraphicsManager.cs): `src/Libraries/RevitNodes/Graphics/GraphicsManager.cs`

### UI and graphics

- [Revit selectors](https://github.com/dynamods/dynamorevit/blob/master/src/Libraries/RevitNodesUI/RevitDropDown.cs): `src/Libraries/RevitNodesUI/RevitDropDown.cs`
- [Revit UI](https://github.com/dynamods/dynamorevit/blob/master/src/DynamoRevit/ViewModel/DynamoRevitViewModel.cs): `src/DynamoRevit/ViewModel/DynamoRevitViewModel.cs`

### Other components

- **Revit host**
- **Dynamo Core**

## Connections

- Revit host → Add-in entry: loads add-in
- Add-in entry → Revit model: starts model
- Add-in entry → Dynamo Core: loads runtime
- Add-in entry → Revit app: uses app services
- Revit model → Document manager: reads active document
- Revit model → Revit event proxy: handles host events
- Revit model → Revit watch: sets watch handler
- Revit model → Revit UI: coordinates UI
- Revit model → Element wrappers: reconciles elements
- Revit model → Revit host: updates host model
- Element wrappers → Document manager: uses current document
- Element wrappers → Transaction manager: manages changes
- Element wrappers → Element binder: tracks element trace
- Element wrappers → Element lifecycle: registers wrappers
- Element wrappers → Geometry conversion: converts geometry
- Document manager → Transaction manager: opens transaction
- Revit selectors → Document manager: queries document
- Revit watch → Document manager: selects elements
- Revit graphics → Revit host: renders mesh data
