# chrisbishop/revittemplates architecture

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

- Interactive diagram: https://gitdiagram.com/chrisbishop/revittemplates
- Repository: https://github.com/chrisbishop/revittemplates

## Overview

This repository provides Revit add-in project templates, not a single feature-complete add-in. The principal generated workflow is Revit loading the application, which registers a ribbon command; that command can open a modal or modeless MVVM view, show a task dialog, or resolve a view through the optional host. The tree also contains a multi-version installer generator. The source uses conditional template variants, so some paths are alternatives rather than one combined runtime. Other README capabilities are documented but their implementation paths are not present in the supplied tree.

Main entry points: [`source/Nice3point.Revit.AddIn/Application.cs`](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Application.cs) (Application entry), [`source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs`](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs) (Command entry), [`source/Nice3point.Revit.AddIn/Views/Nice3point.Revit.AddInView.xaml.cs`](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Views/Nice3point.Revit.AddInView.xaml.cs) (WPF view), [`source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs`](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs) (Installer generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Add-in lifecycle"]
  node_application["Application entry<br/>[Application.cs]"]
  node_appcommand["Application command<br/>[StartupCommand.cs]"]
end

subgraph group_commandui["Command and UI"]
  node_command["Command entry<br/>[StartupCommand.cs]"]
  node_viewmodel["View model"]
  node_view["WPF view"]
  node_dialog["Task dialog<br/>[StartupCommand.cs]"]
end

subgraph group_hosting["Optional hosting"]
  node_host["Service host<br/>[Host.cs]"]
  node_appoptions["Host options"]
end

subgraph group_installer["Installer"]
  node_installerinput(("Versioned files"))
  node_generator["Installer generator"]
  node_installer["Installer entities"]
end

node_revit(("Revit"))

node_revit -->|"loads"| node_application
node_application -.->|"starts optionally"| node_host
node_application -->|"registers ribbon command"| node_command
node_application -.->|"alternative command type"| node_appcommand
node_command -.->|"resolves view optionally"| node_host
node_command -->|"creates or shows"| node_view
node_command -.->|"shows alternatively"| node_dialog
node_view -->|"sets data context"| node_viewmodel
node_installerinput -->|"reads directories"| node_generator
node_generator -->|"generates entities"| node_installer

click node_application "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Application.cs"
click node_appcommand "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Application/Commands/StartupCommand.cs"
click node_command "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs"
click node_viewmodel "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/ViewModels/Nice3point.Revit.AddInViewModel.cs"
click node_view "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Views/Nice3point.Revit.AddInView.xaml.cs"
click node_dialog "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs"
click node_host "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Host.cs"
click node_appoptions "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Config/Options/ApplicationOptions.cs"
click node_generator "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs"
click node_installer "https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.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_application,node_appcommand toneBlue
class node_command,node_viewmodel,node_view,node_dialog toneAmber
class node_host,node_appoptions toneMint
class node_installerinput,node_generator,node_installer toneRose
class node_revit toneIndigo
```

## Components

### Add-in lifecycle

- [Application entry](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Application.cs): `source/Nice3point.Revit.AddIn/Application.cs`
- [Application command](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Application/Commands/StartupCommand.cs): `source/Nice3point.Revit.AddIn.Application/Commands/StartupCommand.cs`

### Command and UI

- [Command entry](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs): `source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs`
- [View model](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/ViewModels/Nice3point.Revit.AddInViewModel.cs): `source/Nice3point.Revit.AddIn/ViewModels/Nice3point.Revit.AddInViewModel.cs`
- [WPF view](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Views/Nice3point.Revit.AddInView.xaml.cs): `source/Nice3point.Revit.AddIn/Views/Nice3point.Revit.AddInView.xaml.cs`
- [Task dialog](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs): `source/Nice3point.Revit.AddIn/Commands/StartupCommand.cs`

### Optional hosting

- [Service host](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Host.cs): `source/Nice3point.Revit.AddIn/Host.cs`
- [Host options](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn/Config/Options/ApplicationOptions.cs): `source/Nice3point.Revit.AddIn/Config/Options/ApplicationOptions.cs`

### Installer

- **Versioned files**
- [Installer generator](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs): `source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs`
- [Installer entities](https://github.com/chrisbishop/revittemplates/blob/main/source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs): `source/Nice3point.Revit.AddIn.Solution/install/Installer.Generator.cs`

### Other components

- **Revit**

## Connections

- Revit → Application entry: loads
- Application entry → Service host: starts optionally
- Application entry → Command entry: registers ribbon command
- Application entry → Application command: alternative command type
- Command entry → Service host: resolves view optionally
- Command entry → WPF view: creates or shows
- Command entry → Task dialog: shows alternatively
- WPF view → View model: sets data context
- Versioned files → Installer generator: reads directories
- Installer generator → Installer entities: generates entities
