How franpossetto/nina works
Main Components
• Revit Host Environment: At the top level, envision Revit (with its supported Revit API) as the host application into which your add-ins load.
• -in Modules: The solution contains multiple add-in projects targeting specific Revit versions (Nina.R2017, Nina.R2018, …, Nina.R2024). Each module is responsible for integration with a particular version of Revit.
• Common Utilities: The Nina.Common folder provides shared services such as configuration, logging, and GitHub integration that serve all add-in modules.
• Tool-Specific Modules: There are numerous specialized libraries addressing distinct functions:
• Nina.Language for language management (localization support for English, Russian, Spanish, etc.)
• Nina.Ribbon for creating and managing the custom Revit ribbon interface where commands are presented.
• Nina.PointCloud, Nina.Links, Nina.Selection, Nina.Visibility for their respective commands and operations (e.g., point cloud visualization, link management, element selection, visibility toggling).
• Installer: The Nina.Installer module provides the installation mechanism, packaging the add-ins into an MSI executable.
• Demo & Assets: These components serve as visual aids and sample configurations but are not core to the functionality.
Relationships and Interactions
• The add-ins (Nina.Rxxxx projects) directly interact with the Revit API. They orchestrate calls to the various tool-specific modules based on user actions in the Revit Ribbon.
• The Nina.Ribbon component acts as the UI layer that provides buttons, panels, and links to directly invoke functions in modules like PointCloud, Links, Selection, and Visibility.
• All add-ins and UI modules depend on Nina.Common for configuration management and logging – ensuring consistent behavior and easier maintenance.
• The Nina.Language module provides localization support across the UI and command implementations, allowing dynamic language changes based on user settings.
• The installer (Nina.Installer) packages these components correctly for deployment. It “glues” the different modules together during installation into the Revit environment.
Architectural Patterns and Design Principles
• Modular Design: The project’s structure clearly separates concerns by using directories for each distinct functionality. For example, version-specific add-ins allow tailored integrations while shared common code avoids duplication.
• Reusability: Common utilities, language management, and configuration files (e.g., in Nina.Common and Nina.Language) are used across many modules.
• UI Abstraction: The Ribbon module abstracts the creation and management of the user interface into its own component.
• Version Targeting: Maintaining separate projects for different Revit versions (R2017 through R2024) means that the architecture embraces version-specific customization, yet connects them via a common framework and shared libraries.