{"id":20382718,"url":"https://github.com/autodesk-forge/design.automation-windows-services-sample","last_synced_at":"2025-04-12T08:54:00.532Z","repository":{"id":23216642,"uuid":"26573749","full_name":"Autodesk-Forge/design.automation-windows-services-sample","owner":"Autodesk-Forge","description":"Plot drawing in a folder: Windows service sample to plot a drawing placed in a folder using Design Automation API","archived":false,"fork":false,"pushed_at":"2018-10-05T19:57:43.000Z","size":4213,"stargazers_count":6,"open_issues_count":0,"forks_count":6,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-12T08:53:54.882Z","etag":null,"topics":["autocad","csharp","design-automation","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autodesk-Forge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-13T06:17:53.000Z","updated_at":"2025-02-01T08:38:49.000Z","dependencies_parsed_at":"2022-08-21T14:00:59.735Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/design.automation-windows-services-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fdesign.automation-windows-services-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fdesign.automation-windows-services-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fdesign.automation-windows-services-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fdesign.automation-windows-services-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/design.automation-windows-services-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocad","csharp","design-automation","windows"],"created_at":"2024-11-15T02:18:46.001Z","updated_at":"2025-04-12T08:54:00.513Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample of Windows Service by Design Automation API\n(Formely AutoCAD I/O)\n\n[![.net](https://img.shields.io/badge/.net-4.5-green.svg)](http://www.microsoft.com/en-us/download/details.aspx?id=30653)\n[![odata](https://img.shields.io/badge/odata-4.0-yellow.svg)](http://www.odata.org/documentation/)\n[![ver](https://img.shields.io/badge/Design%20Automation%20API-2.0-blue.svg)](https://developer.autodesk.com/api/autocadio/v2/)\n[![visual studio](https://img.shields.io/badge/visual%20studio-2015%2F2017-yellowgreen.svg)](https://www.visualstudio.com/)\n[![License](http://img.shields.io/:license-mit-red.svg)](http://opensource.org/licenses/MIT)\n\n## Description\nWindows service sample to plot a drawing placed in a folder to PDF using Design Automation API\n \n## Thumbnail\n![thumbnail](/thumbnail.png) \n\n## Industry Background\n* an utility to convert AutoCAD drawing to PDF automatically on the background. \n\n## Setup\n\n### Dependencies \n* Download and install [Visual Studio](https://visualstudio.microsoft.com/downloads/). In the latest test, Visual Studio version is 2017.\n* Get the auxiliary library project [design.automation-.net-library](https://github.com/Autodesk-Forge/design.automation-.net-library)\n\n### Prerequisites\n1. **Forge Account**: Learn how to create a Forge Account, activate subscription and create an app at [this tutorial](http://learnforge.autodesk.io/#/account/). Make sure to select the service **Design Automation**.\n2. Make a note with the credentials (client id and client secret) of the app. \n3. as mentioned in **Dependencies**, ensure to build the auxiliary library project and get the binary dll.\n\n\n## Running locally  \n\n1. Open the project. Restore the packages of the project by [NuGet](https://www.nuget.org/. The simplest way is\n  * VS2012: Projects tab \u003e\u003e Enable NuGet Package Restore. Then right click the project\u003e\u003e\"Manage NuGet Packages for Solution\" \u003e\u003e \"Restore\" (top right of dialog)\n  * VS2013/VS2015/2017:  right click the project\u003e\u003e\"Manage NuGet Packages for Solution\" \u003e\u003e \"Restore\" (top right of dialog)\n2. Add other missing references and the library of[design.automation-.net-library](https://github.com/Autodesk-Forge/design.automation-.net-library)\n3. In the project settings, provide the following details:\n * Path to a local folder in your system that contains AutoCAD drawings.\n * Design Automation Client Id\n * Design Automation Client Secret\n * Bucket name in your AWS S3 Storage\n  ![Picture](./assets/1.PNG)\n4. Open “App.Config” file and provide AWS credentials. This will allow the sample project to access S3 storage in your AWS profile.\n ![Picture](./assets/2.png)\n5. Build the sample project\n6. Install the windows service using “installutil” in the command line of Visual Studio. To do this open Visual studio command prompt and run : \n     installutil \u003c path to PlotToPDFService.exe \u003e\n7. Start the windows service. To do this from the Run windows, type services.msc and look for Plot2PDFService and start it.\n  ![thumbnail](./assets/3.png)\n8. You may need to switch to \"[Log on local system account\" of the service if you hit an error of \"Access Denied\".\n  ![Picture](./assets/winservlogon.png)\n9. Copy any drawing to the watched folder (C:\\Temp by default). After some time, a PDF of the same name should be available in the watched folder.\n  ![Picture](./assets/4.PNG)\n\n## Known Issues\n* as of writing, Design Automation of Forge is released with version 2. Odata is used with .NET project. In futher version, OData might not be used. \n\n\n## Further Reading \n* [Design Automation API help](https://forge.autodesk.com/en/docs/design-automation/v2/developers_guide/overview/)\n* [ Intro to Design Automation API Video](https://www.youtube.com/watch?v=GWsJM344CJE\u0026t=107s)\n* [Create Windows Services in C#](https://dzone.com/articles/create-windows-services-in-c)\n\n## License\n\nThese samples are licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.\n\n## Written by \n\nBalaji Ramamoorthy \nupdated by Xiaodong Liang","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fdesign.automation-windows-services-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fdesign.automation-windows-services-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fdesign.automation-windows-services-sample/lists"}