Skip to content

Autodesk-Forge/design.automation-asp.net-cabinet-sample

Repository files navigation

Design Automation ASP.net Cabinet Sample

(Formely AutoCAD I/O)

.net odata Design Automation Viewer visual studio License

##Description

An ASP.Net Web application that uses Design Automation and Viewer API to preview and create a closet drawing by customization.

##Dependencies

##Setup/Usage Instructions

  • Firstly, test the workflow of package and workitem by Windows console program Custom-Apppackage
    • open the solution Custom-Apppackage
    • Unzip [ObjectARX SDK] (http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=773204). Add AcCoreMgd, AcDbMgd from SDK/inc to the project CustomPlugin
    • Build project CustomPlugin. It is better to test with local AutoCAD to verify the custom command
    • Restore the packages of project Client by NuGet. The simplest way is to right click the project>>"Manage NuGet Packages for Solution" >> "Restore" (top right of dialog)
    • Restore the reference of AutoCADIOUtil from design.automation-.net-library
    • Add other refererences in they are missing
    • input your client key and client secret of Design Automation in line 19 and 20 of Program.cs.
    • Build the solution and run the solution
    • Verify the whole process is working, and if a final drawing will be generated.
    • The scripts used by the custom activities like below Script = "tilemode\n1\n_filedia\n0\nCreateCloset\n6\n3\n8\n2\n40\n3\n1\n.VSCURRENT\nsketchy\n_.Zoom\nExtents\n_.SaveAs\n\nResult.dwg\n"
  • run Program.cs and verify the activity works well
  • you can also use aother program of design automation to create an activity

The script used by the CreateCloset activity makes use of a custom command named “CreateCloset” which is provided by CustomPlugin. The CreateCloset activity will bind the package.

  • Open the solution AutoCADIODemoWebApp.sln.

  • Restore the packages of project Client by NuGet. The simplest way is to right click the project>>"Manage NuGet Packages for Solution" >> "Restore" (top right of dialog)

  • Add other refererences in they are missing

  • input your client key and client secret of Forge (this assumes the credential has been authorized with Design Automation, Data Management, Model Derivitive), and AWS S3 bucket name in the project setting []

  • input your AWS key and secret in Web.config. []

    • Also provide your email credentials. This will allow this web application to send the drawing as an attachment in an email.

Picture

  • Build the sample project Host the web app or run it locally. This will display the web page as shown in below screenshot :

Picture

  • Change the closet parameters as needed. Click on “Preview” button This generates a drawing with the closet model using AutoCAD Automation and the drawing is loaded in the viewer as shown in below screenshot.

thumbnail

  • Click on “Send Email” button This generate a drawing with the closet model using AutoCAD Design Automation and this drawing is emailed as an attachment to the email id provided. A screenshot of the email that is sent is shown below.

Picture

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Balaji Ramamoorthy. Maintained by Xiaodong Liang Forge Partner Development

About

Generate a closet design: An ASP.Net Web application using the Design Automation API and Viewer library to customize, view and create a closet drawing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published