Bulk File Uploader for ACC
Win64, EnglishGeneral Usage Instructions
- Knowledge of Data Management API of Autodesk® Platform Services (APS)
- Knowledge of .NET Framework and WinForms in C#
- Install Visual Studio (Windows version)
- Install .NET 8 Runtime installer
- Install Node.Js along with npm
- Install Webview2 Evergreen Runtime
- Create an Autodesk APS app to get developer credentials. Visit Autodesk Platform Sevices Portal, sign up for an account, and then create an app. For this new app, select the type of web application, as this application will support both 2-legged and 3-legged authentication. Next, input http://localhost:8083/code as the callback URL. Finally, take note of the client ID and client secret.
- If you work with Autodesk® BIM 360® or Autodesk Construction Cloud® (ACC), you will also need an additional step to connect your APS app to the BIM 360 or ACC account. Follow the tutorial
Please follow this video to know more about the tool :- Oerview Video
Commands
Installation/Uninstallation
- Clone this project or download it. It's recommended to install GitHub desktop. To clone it via command line, use the following command line on Windows:
git clone https://github.com/autodesk-platform-services/aps-hubs-bulk-files-manager.git - Build the published version of this application by the following command line in the root solution folder (same folder of bulk-file-manager.sln). This will install required packages automatically and build a distributable application at: \aps-hubs-bulk-files-manager\bin\Debug\net8.0-windows\win-x64\publish\
dotnet publish -r win-x64 - Run the application file Bulk-File-Manager.exe, it will launch the tool with a login form. Please enter your APS client id and client secret. This activity will be conducted only once, as the application will save these details in the database for future authentication. If you already have a setting file (JSON), click Import Settings to configure the setting.
Additional Information
- Upload Documents to BIM360 or ACC: The workflow is how to upload a local file to a folder of BIM 360 or ACC.
- Download Documents from BIM360 or ACC: the workflow How to download a model from BIM 360 or ACC to local.
- APS Tutorial of HubBrowser: tutorial on accessing models of BIM 360 or ACC and loading them in APS Viewer in the browser.
- Electron .NET: development of desktop applications using web technologies such as the Chromium rendering engine and the Node.js runtime
- Hangfire: Web monitoring UI which is implemented as an OWIN extension and can be hosted inside any application – ASP.NET, Console or Windows service.
- Bogus: load databases, UI and apps with fake data for testing needs.
- Fody: extensible library for weaving .NET assembly
- Polly: .NET resilience library
Known Issues
Contact
Author/Company Information
Support Information
There are two ways to communicate between the host and the UI:
- REST calls
- Standard ASP.net controllers may be used to send messages from the UI to the backend.
- PostMessage
- The UI is able to send messages to the backend using window.chrome.webview.postMessage(YOUR_MESSAGE_HERE). It is then processed by the WebMessageReceived() method in Bulk-Uploader-FrontEnd/Views/MainForm.cs.
- The backend is able to respond using this.webView21.CoreWebView2.PostWebMessageAsString(YOUR_MESSAGE_HERE). It is then processed by the UI using window.chrome.webview.addEventListener('message', event=>{ alert(event.data) }) in Bulk-Uploader-FrontEnd/ClientApp/src/App.tsx.
- This has been simplified on the front end with the useMessageListener(messagename) hook.
React Notes
When using <NavLink/> to go between the SPA and other pages (such as the hangfire dashboard), you must use the reloadDocument parameter to force React Router to treat it as a normal <a href="..."> element.
Database
This application uses Entity Framework. If you make any changes to the data structures, you'll need to run the following command from the Bulk-Uploader-FrontEnd folder:
dotnet ef migrations add NameOfYourMigrationHere --project "..\ApsSettings.Data\ApsSettings.Data.csproj"
Additional Notes
- In debugging mode, the flower icon on the bottom right corner will show up. It is the console that tracks the logs of each HTTP traffic.
Building
To build the application for a Windows machine, use dotnet publish -r win-x64 while in the root solution folder.
Version History
| Version Number | Version Description |
|---|---|
|
1.0.0 |
1. Adapted the solution to support the ore version. 2. Fixed issues with the Forge Authentication API. 3. Disabled the automatic opening of the login page. 4. Revised the User Document and Developer Guide. 5. Developed a token manager that attempts both 3LO and 2LO authentication methods. 6. Eliminated hardcoded endpoints in Utility Flows. |