(Formely AutoCAD I/O)
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.
To batch convert DWG to PDF by web services, instead of plugin of local AutoCAD.
- Download Visual Studio
- 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.
- Make a note with the credentials (client id and client secret) of the app.
- 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)
- Apply credencials of Design Automation API from https://developer.autodesk.com/. Put your Forge credentials in program.cs
- Run project, you will see a status in the console:
- if everything works well, the result file (pdf) and the report files will be downloaded at MyDocuments.
- if there is any error with the process, check the report file what error is indicated.
These samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Jonathan Miao & Albert Szilvasy