Skip to content

xiaodongliang/design.automation-.net-basic-sample

 
 

Repository files navigation

Design Automation API Basic Sample in C#

(Formely AutoCAD I/O)

.net odata Design Automation visual studio License

Description

This is the simplest C# client that uses the predefined PlotToPDF activity of AutoCAD Design Automation . It is the sample for the tutorial of design automation API.

Industry background

To batch convert DWG to PDF by web services, instead of plugin of local AutoCAD.

Thumbnail

thumbnail

Setup

Dependencies

Prerequisites

  1. Forge Account: Learn how to create a Forge Account, activate subscription and create an app at this tutorial. Make sure to select the service Design Automation.
  2. Make a note with the credentials (client id and client secret) of the app.

Running locally

  1. Restore the packages of the project by NuGet. The simplest way is
  • VS2012: Projects tab >> Enable NuGet Package Restore. Then right click the project>>"Manage NuGet Packages for Solution" >> "Restore" (top right of dialog)
  • VS2013/VS2015/2017: right click the project>>"Manage NuGet Packages for Solution" >> "Restore" (top right of dialog)
  1. Apply credencials of Design Automation API from https://developer.autodesk.com/. Put your Forge credentials in program.cs
  2. Run project, you will see a status in the console:
  3. if everything works well, the result file (pdf) and the report files will be downloaded at MyDocuments.
  4. if there is any error with the process, check the report file what error is indicated.

Further Reading

License

These samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Jonathan Miao & Albert Szilvasy

About

Plot to PDF in C#: Shows how to issue a direct HTTP requests to call the Design Automation API of AutoCAD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%