How doctorraz/changedbmod works
Project type and purpose
• This is a .NET–based CAD extension (plugin) for switching MultiCAD databases.
• The solution contains two plugin projects (AC and NC), targeting different CAD platforms (likely “AutoCAD” and “NanoCAD” or similar).
• The shared code under src/ implements the core command logic and services.
File structure
• Top-level:
• AC/ChangedbMod_AC_2024.csproj – Plugin for the AC platform
• NC/ChangedbMod_NC.csproj – Plugin for the NC platform
• src/ – Shared core library
• src/CadCommands/ – Commands exposed to the CAD host
• src/Interfaces/ – Abstractions for messaging and user interaction
• src/Servise/ – Implementations of services, constants, utilities
• There’s a single solution file (ChangeDBmod.sln), plus standard .NET configuration files.
Insights from README
• The tool is invoked as a CAD command drz_changedb.
• Its job: switch the active database in a MultiCAD environment.
• No external services or databases—just reading/writing config and calling the host’s API.
Main components and their relationships
a. CAD Host Applications
• AutoCAD (AC) and NanoCAD (NC) as separate plugin hosts.
b. Plugin Assemblies
• AC plugin (ChangedbMod_AC) and NC plugin (ChangedbMod_NC).
• Both reference the shared core library under src/.
c. Core Library (“src”)
• CadCommands: defines and registers the drz_changedb command.
• Interfaces: defines IAllMessageService, IInputBoxService, IMessageService, IQuestionService.
• Services: implements messaging (MessageService), collects command metadata (CmdInfo/ListCMDInfo), holds constants (SysConstant), gathers host info (SysInfo), and performs filesystem work (UtilitesWorkFil).
d. File System Interaction
• UtilitiesWorkFil reads/writes the CAD database configuration files.
e. User Interaction Flow
• Command entry → CadCommand invokes Services → Services use Interfaces to prompt user or display messages → UtilitiesWorkFil updates the DB file → Confirmations via MessageService.
Architectural patterns and design principles
• Dependency inversion: interfaces in src/Interfaces decouple command logic from messaging & UI.
• Single Responsibility: Services folder splits responsibilities (messaging, I/O, metadata).
• Plugin modularity: two thin shim projects (AC/NC) reference a common core.