IFC Alignment Manager
A free, open-source Autodesk Revit 2026 add-in that automatically aligns IFC consultant models to a host project’s shared coordinate system — in seconds, with one-click undo.
Built by Devendra Gupta · MIT License · Revit 2026 · .NET 10 · Zero dependencies
The Problem
In any multi-discipline BIM project, you open an architect’s IFC, a structural IFC, and an MEP IFC — and none of them sit in the same place. Coordinates are off by thousands of feet, True North is rotated, survey points don’t match. You fix it manually, the consultant sends a revised model, and you do it all again.
IFC Alignment Manager eliminates this loop.
What It Does
- Reads the full coordinate state of any two open Revit documents — Project Base Point, Survey Point, Shared Origin, True North angle, and bounding box — in a single diagnostic pass.
- Computes the exact translation and rotation needed to align the consultant model to the host, using your choice of method: Project Base Point, Survey Point, Internal Origin, or manual two-point pick.
- Applies the transform via Revit’s native
ProjectPosition API (shared coordinates, no geometry moved) with a full transaction that rolls back automatically on any error.
- Saves a restore point (JSON snapshot of the original position) before every alignment, giving you one-click undo even after closing the wizard.
- Saves alignment profiles per consultant, so when they send a revised IFC next week you re-align in two clicks without recalculating anything.
- Exports an HTML report with a full coordinate comparison table, transform values in both feet and meters, severity badges, and a residual error result — ready to attach to your project handover package.
- Exports and imports profile bundles as ZIP archives, so a BIM manager can distribute a project’s full alignment setup to the whole team at once.
Requirements
| Item |
Value |
| Autodesk Revit |
2026 |
| .NET Runtime |
10.0 (bundled with Revit 2026) |
| OS |
Windows 10 / 11 (64-bit) |
| NuGet packages |
None |
| Admin rights |
Not required for per-user install |
Installation
Option A — Add-in (Recommended, gives you a Ribbon tab)
- Download the latest release ZIP from the Releases page.
- Unzip it.
- Close Revit 2026 if it is open.
- Run
deploy.ps1 in PowerShell:.\deploy.ps1
- Launch Revit 2026. You will see an IFC Alignment tab in the ribbon with four buttons.
The script copies files to %APPDATA%\Autodesk\Revit\Addins\2026\ (per-user) and %ProgramData%\Autodesk\Revit\Addins\2026\ (all-users). It backs up any existing installation and rolls back if the copy fails.
Option B — Macro Manager (no install, portable)
- In Revit 2026, open Manage → Macro Manager.
- Under Revit, click Create and name the module
IFCAlignmentManager.
- Copy all
.cs files from Core\, Services\, UI\, Tests\, plus App.cs and ThisApplication.cs into the macro folder shown by the Macro Manager.
- Click Build in Macro Manager.
- Run any of the four macros:
RunAlignmentWizard, RunDiagnosticsOnly, ManageProfiles, RunSelfTests.
Building from Source
# Prerequisites: Visual Studio 2022 or .NET 10 SDK, Revit 2026 installed
git clone https://github.com/devendragupta-BIM/IFCAlignmentManager.git
cd IFCAlignmentManager\IFCAlignmentManager
# The .csproj references RevitAPI.dll and RevitAPIUI.dll from the default
# Revit 2026 install path: C:\Program Files\Autodesk\Revit 2026\
# If yours is different, update the HintPath in the .csproj before building.
dotnet build -c Release
# Expected: 0 errors, 0 warnings, output in bin\Release\
Usage
Alignment Wizard (main workflow)
- Open your host Revit model and the consultant’s IFC-linked model in the same Revit session.
- Click Alignment Wizard on the IFC Alignment ribbon tab.
- Step 1 — Select Documents: Choose host and consultant from the dropdowns.
- Step 2 — Diagnostics: Review the coordinate delta table. Severity is shown as
None / Minor / Major / Critical.
- Step 3 — Method & Preview: Choose an alignment method (Project Base Point recommended for most IFC workflows). The transform preview shows translation in both feet and meters and an estimated residual error.
- Step 4 — Confirm: Review the summary. Tick Save as profile and give it a name if you want to reuse this alignment next revision.
- Step 5 — Result: A green tick confirms success. The post-alignment residual error is shown. Click Open Report for the full HTML report. Click Undo to restore the original position using the automatically saved restore point.
Alignment Methods
| Method |
Use when |
| Project Base Point |
Both models have meaningful, comparable PBP locations. Most common for IFC. |
| Survey Point |
Models are georeferenced to a real-world survey coordinate. |
| Internal Origin |
IFC was exported from a tool that uses internal origin as its reference. |
| Manual Two-Point |
None of the above. Pick two corresponding points in each model’s view. |
Diagnostics View
Click Diagnostics to inspect any open document’s coordinate state without running any alignment. Useful for auditing a model before a project handover meeting.
Profile Manager
Saved profiles store the full transform (translation + rotation + pivot) and a baseline coordinate snapshot. On the next IFC revision, the wizard validates that the consultant model’s starting coordinates match the baseline before applying. If they don’t match (e.g. the consultant changed their origin), you get a clear warning rather than a silent misalignment.
Sharing profiles across a team:
- BIM Manager: open Profile Manager → Export All → share the
.zip
- Team member: open Profile Manager → Import → select the
.zip
Running Self-Tests
Click Run Self Tests in the ribbon (or call macro RunSelfTests). All 15 unit tests run without touching any open model and report pass/fail in a Revit dialog. All 15 must pass before using the tool in production.
Tests cover: zero transform, pure translation X/Y, 45° rotation, combined transform, two-point alignment, residual error calculation, national-grid-scale coordinates, unit conversion, mismatch detection, sub-milliradian angle handling, locale-safe restore point JSON, and profile ZIP round-trip.
Project Structure
IFCAlignmentManager/
├── App.cs # Revit IExternalApplication — ribbon registration
├── ThisApplication.cs # Macro Manager entry points (4 macros)
├── IFCAlignmentManager.addin # Revit add-in manifest
├── deploy.ps1 # Deployment script (user + all-user + macro paths)
│
├── Core/
│ ├── AppVersion.cs # Version constant (v2.0.0)
│ ├── AlignmentProfile.cs # ConsultantAlignmentProfile data contract
│ ├── CoordinateData.cs # CoordinateSnapshot, AlignmentRestorePoint
│ ├── DiagnosticsResult.cs # DiagnosticsResult data contract
│ ├── AlignmentTransformResult.cs # Proposed transform output
│ ├── TransformResult.cs # Applied transform result
│ └── ProfileValidationResult.cs # Profile compatibility check result
│
├── Services/
│ ├── CoordinateDiagnosticsService.cs # Reads PBP, SP, shared origin, units, bbox
│ ├── TransformCalculatorService.cs # Computes translation + rotation vector
│ ├── AlignmentExecutionService.cs # Applies transform via ProjectPosition API
│ ├── ValidationService.cs # Pre- and post-alignment validation
│ ├── ProfileStorageService.cs # Save/load/export/import profiles (JSON + ZIP)
│ └── HtmlReportService.cs # Generates styled HTML alignment report
│
├── UI/
│ ├── AlignmentWizardForm.cs # 5-step alignment wizard (WinForms)
│ ├── DiagnosticsViewForm.cs # Read-only coordinate inspector
│ ├── ProfileManagerForm.cs # Saved profile browser + export/import
│ └── AppIcons.cs # Programmatic icon generation (GDI+, no image files needed)
│
├── Tests/
│ ├── TransformMathTests.cs # 15 pure-math unit tests (no Revit session needed)
│ ├── CoordinateReadTests.cs # API integration tests (require open documents)
│ └── TestRunner.cs # Orchestrates all tests, returns formatted report
│
└── Icons/ # Exported PNG icons for ribbon buttons
├── Wizard_32.png / Wizard_16.png
├── Diagnostics_32.png / Diagnostics_16.png
├── Profile_32.png / Profile_16.png
└── Tests_32.png / Tests_16.png
Design Constraints
This project was built under strict constraints to ensure it installs and runs on any Revit 2026 machine without any IT involvement:
- Zero NuGet / third-party packages. Only
RevitAPI.dll, RevitAPIUI.dll, and the .NET 10 BCL.
- WinForms only. No WPF, no XAML, no additional runtimes.
- All Revit writes inside a
Transaction with try/catch/RollBack. The model is never left in a partial state.
- JSON via
System.Runtime.Serialization.Json only. No Newtonsoft.Json, no System.Text.Json.
- HTML reports only. No PDF generation libraries.
- Restore point before every alignment. One-click undo is always available.
Known Limitations
- Revit 2026 only. The API surface used (
ProjectPosition, WorksharingUtils, ProgressHandle) targets Revit 2026 specifically. Earlier versions are not supported and will not build correctly.
- Geometry fallback is slow on large models. The
ProjectPosition path (default) is instant. The geometry fallback (used when ProjectPosition is unavailable) moves all non-pinned elements and can take several minutes on dense models. A progress dialog is shown and the operation is cancellable.
- BIM 360 / Revit Server worksharing requires the ProjectLocation element to be checked out. The tool attempts this automatically but cannot override another user’s checkout.
- Macro Manager path requires Revit to recompile the source files on first use. The ribbon add-in path (Option A install) is recommended for production use.
Contributing
Pull requests are welcome. Please:
- Fork the repo and create a feature branch.
- Apply changes only to files in
Core/, Services/, UI/, or Tests/. Do not add NuGet packages.
- Run
RunSelfTests in Revit and confirm all 15 pass.
- Update
BUILD_NOTES.md with what you changed and the test results.
- Open a PR describing the problem solved and how you tested it.
License
MIT — free to use, modify, and distribute. See LICENSE for details.
Author
Devendra Gupta — BIM Engineer
Built to solve a real problem on real projects. If it saves you time, a star on the repo is appreciated.
评论