Purpose
Add-ins that are robust in real models and maintainable across years.
The standard
C# per 04.03. One
.csprojmulti-targeting per year via configurations; conditional compilation for API differences kept in a singleCompatfolder.Entry:
IExternalApplicationfor ribbon setup; each button →IExternalCommandwith[Transaction(TransactionMode.Manual)].All model changes in a named
Transaction/TransactionGroup; failures handled withIFailuresPreprocessorwhere user prompts would block.Element selection via
FilteredElementCollectorwith filters, never LINQ over all elements.Long operations show progress and can cancel; no modal UI during document events.
Settings per user in
%APPDATA%\[TEAM]\<tool>\settings.json; per project in extensible storage or a project parameter, decided per tool.Logging per 04.06; version and build shown in About.
Unit tests for logic outside the API; manual test model
tests/models/<tool>_test.rvtwith a checklist.
Anti-patterns
Modifying the model from a modeless window without an ExternalEvent; hard-coded parameter names without a shared parameter GUID.
Owner: [TEAM] · Last reviewed: 2026-09