{"id":20382683,"url":"https://github.com/autodesk-forge/forge-viewhubs","last_synced_at":"2025-04-12T08:53:54.007Z","repository":{"id":38076298,"uuid":"82959411","full_name":"Autodesk-Forge/forge-viewhubs","owner":"Autodesk-Forge","description":"Build tree view of content: Using the jsTree library, this sample shows you how to build a basic tree view of Hubs, Projects, Folders and Items. Supports menus and reloading among other features","archived":false,"fork":false,"pushed_at":"2023-03-04T00:12:49.000Z","size":26816,"stargazers_count":26,"open_issues_count":3,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T08:53:48.309Z","etag":null,"topics":["autodesk-bim360","autodesk-data-management","autodesk-viewer","civil3d","csharp","net-core"],"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":"2017-02-23T18:43:06.000Z","updated_at":"2025-03-22T23:32:02.000Z","dependencies_parsed_at":"2022-08-10T05:41:00.434Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/forge-viewhubs","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-viewhubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewhubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewhubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewhubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/forge-viewhubs/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":["autodesk-bim360","autodesk-data-management","autodesk-viewer","civil3d","csharp","net-core"],"created_at":"2024-11-15T02:18:36.621Z","updated_at":"2025-04-12T08:53:53.978Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# View models on hubs (BIM 360 or Fusion Team)\n\n![Platforms](https://img.shields.io/badge/platform-Windows|MacOS-lightgray.svg)\n![.NET](https://img.shields.io/badge/.NET%20Core-3.1-blue.svg)\n[![License](http://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\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[![Viewer](https://img.shields.io/badge/Viewer-v6-green.svg)](http://developer.autodesk.com/)\n[![BIM-360](https://img.shields.io/badge/BIM%20360-v1-green.svg)](http://developer.autodesk.com/)\n\n![Intermediate](https://img.shields.io/badge/Level-Intermediate-blue.svg)\n\n# Description\n\nThis sample show a basic tree view with Hubs, Projects, Folders and Items. It does not use the ASP.NET native [TreeView](https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.aspx) due its limitations, but the [jsTree](https://www.jstree.com/) library, that have support for menus, reload, among other features. This sample is based on the [Learn Forge](http://learnforge.autodesk.io) tutorial.\n\nThe tree view will display personal enterprise (shared) hubs, with respective projects. For Civil 3D drawings with Alignments, the **Alignment Design Check** toolbar icon list aligments and compare its curves with a minimum radius value. The following image demonstrate a tipical tree view:\n\n## Thumbnail\n\n![thumbnail](/thumbnail.gif) \n\n## Live version\n\n[forgedatamanagement.herokuapp.com](https://forgedatamanagement.herokuapp.com)\n\n# Setup\n\n## Prerequisites\n\n1. **BIM 360 Account**: (optional) must be Account Admin to add the app integration. [Learn about provisioning](https://forge.autodesk.com/blog/bim-360-docs-provisioning-forge-apps).\n2. **Forge Account**: Learn how to create a Forge Account, activate subscription and create an app at [this tutorial](http://learnforge.autodesk.io/#/account/). \n3. **Visual Studio**: Either Community (Windows) or Code (Windows, MacOS).\n4. **.NET Core** basic knowledge with C#\n5. **JavaScript** basic knowledge with **jQuery**\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://github.com/Autodesk-Forge/forge-viewhubs\n\n**Visual Studio 2022** (Windows):\n\nRight-click on the project, then go to **Debug**. Click on `Open debug launch profiles UI`. Adjust the settings as shown below. \n\n![](forgeSample/wwwroot/img/readme/debug_settings_1.png)\n\nFinally scroll down the same window to `enable SSL` and `Anonymous Authentication`. Make sure they are both checked.\n\n![](forgeSample/wwwroot/img/readme/debug_settings_2.png)\n\n**Visual 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![](forgeSample/wwwroot/img/readme/visual_code_restore.png)\n\n**ngrok**\n\nFor webhooks service to send notifications to your localhost server, you may want to use ngrok. Check this link on [how to configure ngrok](https://forge.autodesk.com/en/docs/webhooks/v1/tutorials/configuring-your-server/). You can find more information on about ngrok [here](https://ngrok.com).\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\", e.g https://34e2-105-27-239-221.in.ngrok.io \n},\n```\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\nWatch [this video](https://www.youtube.com/watch?v=Oqa9O20Gj0c) on how deploy samples to Heroku.\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/v6)\n\nTutorials:\n\n- [Learn Forge](http://learnforge.autodesk.io)\n- [View BIM 360 Models](http://learnforge.autodesk.io/#/tutorials/viewhubmodels)\n\n\n### Tips \u0026 Tricks\n\nThis sample uses .NET Core and works fine on both Windows and MacOS, see [this tutorial for MacOS](https://github.com/augustogoncalves/dotnetcoreheroku).\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-viewhubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fforge-viewhubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-viewhubs/lists"}