How autodesk-forge/design.automation-asp.net-cabinet-sample works
Project Type and Purpose
• It’s a full-stack web application (ASP.NET MVC) that:
• Serves an HTML/JS UI (jQuery, jQuery UI, Razor views) and Autodesk Viewer on the browser
• Invokes Autodesk Forge Design Automation v2 (“AutoCAD I/O”) to run custom AutoCAD commands in the cloud
• Stores input/output DWG files on AWS S3
• Uses an email service (SMTP) to send generated drawings
Main Components
a. Browser / Client Layer
– UI: Razor Views (Index.cshtml, _Layout.cshtml, etc.)
– JS: jQuery, jQuery UI, Autodesk Viewer v5.0
b. Web Server / Backend (ASP.NET MVC)
– Presentation: Controllers (HomeController)
– Domain: Models (ClosetModel)
– Data: App_Data MDF (aspnet-MvcApplication2.mdf) for settings/user data
– Configuration: Web.config, AWS & Forge credentials, SMTP settings
c. Forge Design Automation Services
– AppPackage Registration: CustomPlugin (bundled in CreateCloset.bundle/CustomPlugin)
– WorkItem Submission: via design.automation-.net-library (Client.cs in CreateCloset.bundle/Custom-AppPackage)
d. Storage Services
– AWS S3 Bucket: input DWG templates (Blank.dwg, BlankIso.dwg), result.dwg
– Local App_Data database (membership, settings)
e. Email Service
– SMTP server (configured in Web.config) to send the DWG as attachment
f. Development/Test Console (optional)
– CreateCloset.bundle/Custom-Apppackage console app to test AppPackage+WorkItem workflow locally
Relationships and Data Flows
1. User adjusts closet parameters in browser → clicks “Preview” or “Send Email.”
2. Browser posts form to ASP.NET MVC controller.
3. Controller uploads DWG template and parameter JSON to AWS S3.
4. Controller calls Forge Design Automation API:
• Registers / references the CustomPlugin AppPackage
• Submits WorkItem with S3 input, custom script (CreateCloset command), S3 output target
5. Forge executes AutoCAD in the cloud with CustomPlugin → writes result.dwg to S3.
6a. For Preview: Controller calls Forge Model Derivative API (SVF translation) → returns Viewer URN → Browser displays model in Autodesk Viewer.
6b. For Email: Controller downloads result.dwg from S3 → attaches to SMTP email → sends to user.
Architectural Patterns & Key Technologies
– MVC pattern for web tier
– Orchestration layer: .NET client library calling external REST APIs (Forge + AWS)
– Plugin pattern: AutoCAD .NET plugin (CustomPlugin built with ObjectARX SDK)
– Cloud file storage: AWS S3
– API integration: Design Automation v2, Model Derivative, Data Management
Essential Elements
– Clear, concise labels (e.g., “HomeController → ForgeDesignAutomationClient”)
– Note configuration sources (Web.config for credentials)