Small Revit API sample projects focused on specific implementation patterns.
These projects are largely comprised of code excerpts and patterns from real production Revit add-ins, reorganized into focused educational samples with the use of AI. They prioritize clarity and isolated API behavior over reusable framework design.
samples/direct-context-3d- A minimal DirectContext3D add-in that draws transient debug graphics for a selected family instance.
- Autodesk Revit 2025 or 2026
- .NET 8 SDK
- Windows
Autodesk Revit API assemblies are not included in this repository. To build a sample, copy the required DLLs from your local Revit installation into that sample's RevitDLLs folders.
For example, for samples/direct-context-3d:
samples/direct-context-3d/Sample.DirectContext3D/RevitDLLs/2025/RevitAPI.dll
samples/direct-context-3d/Sample.DirectContext3D/RevitDLLs/2025/RevitAPIUI.dll
samples/direct-context-3d/Sample.DirectContext3D/RevitDLLs/2026/RevitAPI.dll
samples/direct-context-3d/Sample.DirectContext3D/RevitDLLs/2026/RevitAPIUI.dll
Typical source locations are:
C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll
C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll
C:\Program Files\Autodesk\Revit 2026\RevitAPI.dll
C:\Program Files\Autodesk\Revit 2026\RevitAPIUI.dll
This repository is licensed under the MIT License. See LICENSE.
This project is not affiliated with, endorsed by, or sponsored by Autodesk. Revit is a trademark of Autodesk, Inc.