# CodeGuardian for Revit

CodeGuardian is a Revit add-in prototype for real-time, Grammarly-style advisory code compliance feedback.

## What It Does

- Adds a `CodeGuardian` ribbon tab to Revit and a `CodeGuardian` panel under Revit's `Add-Ins` tab.
- Scans design elements for advisory compliance warnings.
- Groups warnings by low, medium, and high priority.
- Uses yellow, orange, and red severity colors.
- Lets users choose building typology and thresholds in Options.
- Lets users set project state, local AHJ, adopted code edition, amendments, occupancy, construction type, fire protection, occupant-load basis, accessibility scope, professional review status, and selected permit/code requirements.
- Can import missing permit/code settings from Revit Project Information, title block parameters, and likely cover/code sheets.
- Lets users click a warning to select and zoom to the Revit element.
- Includes a starter download website and user-level installer script.

## Build

Revit 2025 must be installed at `C:\Program Files\Autodesk\Revit 2025\`.

```powershell
dotnet build .\CodeComplianceGuard.slnx
```

## Install For Local Revit

```powershell
.\installer\install.ps1 -RevitVersion 2025
```

Restart Revit after installing. The add-in loads from:

`%APPDATA%\Autodesk\Revit\Addins\2025\CodeGuard.Revit.addin`

## Important Limitation

This prototype performs advisory checks only. Real US building code compliance depends on the adopted code edition, jurisdiction amendments, occupancy, construction type, fire protection, occupant load, accessibility scope, and professional judgment.
