{"id":20382717,"url":"https://github.com/autodesk-forge/forge-civil3d-properties","last_synced_at":"2025-04-12T09:00:25.568Z","repository":{"id":38141765,"uuid":"274262098","full_name":"Autodesk-Forge/forge-civil3d-properties","owner":"Autodesk-Forge","description":"Extract style information from Civil 3D entities and show on the property panel","archived":false,"fork":false,"pushed_at":"2022-12-08T10:48:25.000Z","size":8120,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T04:05:04.925Z","etag":null,"topics":["autodesk-civil3d","autodesk-designautomation","netcore"],"latest_commit_sha":null,"homepage":"https://forge-civil3d.herokuapp.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-22T23:17:42.000Z","updated_at":"2024-09-05T04:48:09.000Z","dependencies_parsed_at":"2023-01-25T01:30:20.684Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/forge-civil3d-properties","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%2Fforge-civil3d-properties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-civil3d-properties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-civil3d-properties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-civil3d-properties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/forge-civil3d-properties/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543857,"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":["autodesk-civil3d","autodesk-designautomation","netcore"],"created_at":"2024-11-15T02:18:45.981Z","updated_at":"2025-04-12T09:00:25.506Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extract style information - Civil 3D\n\n![Platforms](https://img.shields.io/badge/Webapp-Windows|MacOS|Linux-lightgray.svg)\n[![ASP.NET Core](https://img.shields.io/badge/ASP.NET%20Core-3.1-blue.svg)](https://asp.net/)\n[![oAuth2](https://img.shields.io/badge/oAuth2-v1-green.svg)](http://developer.autodesk.com/)\n[![Data-Management](https://img.shields.io/badge/Data%20Management-v1-green.svg)](http://developer.autodesk.com/)\n[![Design-Automation](https://img.shields.io/badge/Design%20Automation-v3-green.svg)](http://developer.autodesk.com/)\n\n![Platforms](https://img.shields.io/badge/Plugins-Windows-lightgray.svg)\n![.NET](https://img.shields.io/badge/.NET%20Framework-4.7-blue.svg)\n[![Civil 3D](https://img.shields.io/badge/Civil%203D-2020-lightblue.svg)](http://developer.autodesk.com/)\n\n![Intermediate](https://img.shields.io/badge/Level-Intermediate-green.svg)\n[![License](http://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\n# Description\n\nThis sample demonstrates using Design Automation with Civil 3D support included in the AutoCAD engine. User can select a DWG file hosted on BIM 360 Document Manager (or A360) and view using the Forge Viewer. \n\nOnce the file is loaded, in the background, a Design Automation workitem will run a .NET plugin to extract additional `Style` information from the file. When ready, the information will be visible on the property panel. \n\nThis sample is based on the [Learn Forge](http://learnforge.autodesk.io) tutorials (`View hubs` section).\n\n# Thumbnail\n\n![thumbnail](/thumbnail.gif)\n\n# Setup\n\n## Prerequisites\n\n1. **Forge Account**: Learn how to create a Forge Account, activate subscription and create an app at [this tutorial](http://learnforge.autodesk.io/#/account/). \n2. **Visual Studio**: Either Community (Windows) or Code (Windows, MacOS). \n3. **.NET Core** basic knowledge with C#\n4. **ngrok**: Routing tool, [download here](https://ngrok.com/)\n7. **Civil 3D** 2020: required to compile changes into the plugin. Windows only.\n\nFor using this sample, you need an Autodesk developer credentials. Visit the [Forge Developer Portal](https://developer.autodesk.com), sign up for an account, then [create an app](https://developer.autodesk.com/myapps/create) that uses Data Management and Model Derivative APIs. For this new app, use `http://localhost:3000/api/forge/callback/oauth` as Callback URL, although is not used on 2-legged flow. Finally take note of the **Client ID** and **Client Secret**.\n\n## Running locally\n\nClone this project or download it. It's recommended to install [GitHub desktop](https://desktop.github.com/). To clone it via command line, use the following (**Terminal** on MacOSX/Linux, **Git Shell** on Windows):\n\n    git clone https://git.autodesk.com/goncala/bim360civil\n\n\n**Visual Studio** (Windows):\n\nRight-click on the project, then go to **Debug**. Adjust the settings as shown below. \n\n![](readme/visual_studio_settings.png)\n\n**Visual Sutdio Code** (Windows, MacOS):\n\nOpen the folder, at the bottom-right, select **Yes** and **Restore**. This restores the packages (e.g. Autodesk.Forge) and creates the launch.json file. See *Tips \u0026 Tricks* for .NET Core on MacOS.\n\n![](readme/visual_code_restore.png)\n\n**ngrok**\n\nRun `ngrok http 3000 -host-header=\"localhost:3000\"` to create a tunnel to your local machine, then copy the address into the `FORGE_WEBHOOK_URL` environment variable.\n\n**Environment variables**\n\nAt the `.vscode\\launch.json`, find the env vars and add your Forge Client ID, Secret and callback URL. Also define the `ASPNETCORE_URLS` variable. The end result should be as shown below:\n\n```json\n\"env\": {\n    \"ASPNETCORE_ENVIRONMENT\": \"Development\",\n    \"ASPNETCORE_URLS\" : \"http://localhost:3000\",\n    \"FORGE_CLIENT_ID\": \"your id here\",\n    \"FORGE_CLIENT_SECRET\": \"your secret here\",\n    \"FORGE_CALLBACK_URL\": \"http://localhost:3000/api/forge/callback/oauth\",\n    \"FORGE_WEBHOOK_URL\": \"your ngrok address here: e.g. http://abcd1234.ngrok.io\"\n},\n```\n\n**Civil 3D plugin**\n\nA compiled version of the `Civil 3D` plugin (.bundles) is included on the `webapp` module, under `wwwroot/bundles` folder. Any changes on these plugins will require to create a new .bundle, the **Post-build** event should create it.\n\nStart the app.\n\nOpen `http://localhost:3000` to start the app, select a DWG file. A pop-up will indicate when the style information is ready.\n\n## Deployment\n\nTo deploy this application to Heroku, the **Callback URL** for Forge must use your `.herokuapp.com` address. After clicking on the button below, at the Heroku Create New App page, set your Client ID, Secret and Callback URL for Forge.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n# Further Reading\n\nDocumentation:\n\n- [BIM 360 API](https://developer.autodesk.com/en/docs/bim360/v1/overview/) and [App Provisioning](https://forge.autodesk.com/blog/bim-360-docs-provisioning-forge-apps)\n- [Data Management API](https://developer.autodesk.com/en/docs/data/v2/overview/)\n- [Viewer](https://developer.autodesk.com/en/docs/viewer/v7) \n- [Design Automation](https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/overview/)\n\n### Troubleshooting\n\n1. **Cannot see my BIM 360 projects**: Make sure to provision the Forge App Client ID within the BIM 360 Account, [learn more here](https://forge.autodesk.com/blog/bim-360-docs-provisioning-forge-apps). This requires the Account Admin permission.\n\n2. **error setting certificate verify locations** error: may happen on Windows, use the following: `git config --global http.sslverify \"false\"`\n\n## License\n\nThis sample is 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\nAugusto Goncalves [@augustomaia](https://twitter.com/augustomaia), [Forge Partner Development](http://forge.autodesk.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-civil3d-properties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fforge-civil3d-properties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-civil3d-properties/lists"}