This repository demonstrates basic scenarios of Model Coordination API in .NET Core, including model sets, clash, property index and clash issue, etc. It also provides a demo on how to classify the raw data, applying them in further comprehensive scenarios.
Order | Sample | Description | Demo |
---|---|---|---|
1 | Environment Check | A sanity check of the current developer environment | help |
2 | Create Model Set | Creating a model set from first principals | help |
3 | Model Set Versions | Querying model set versions via version number and tip | help |
4 | Clash Results | Working with clash test result resources | help |
5 | Assigned and Closed Clash | Querying assigned/closed clash groups and issue details | help |
6 | Model Set Indexes | BIM property querying against a model set version index | help |
7 | Model Set Views | Create and query mode set custom views | help |
8 | Classify Clashing Objects | Use BIM property index to classify clashing objects | help |
The samples in this repository build on one another. The execution order above matters. After Create Model Set, please wait some time for coordinating process completes. Then run the other samples.
If you have not used the sample which creates a model set then you will not be able to use the remaining samples without first tweaking the model set input variables.
-
.NET Core: The console applications currently target
netcoreapp3.1
and have a singlenetstandard2.1
dependency. You will need .NET Core 3.1 SDK installed. The samples can also work withnetcoreapp3.0
, but since AuthWeb ASP.NET Core Blazor WebApp depends onnetcoreapp3.1
, it is recommended usenetcoreapp3.1
with all samples. To test on cross-platform, ensure .NET Core 3.1 SDK has been installed. -
Forge Account: Learn how to create a Forge Account, activate subscription and create an app by this tutorial. Get Forge client id, Forge client secret and Forge callback url. These can be used by option #3 (in RuntimeConfig.md) to get 3-legged token. Please register Forge app with the callback url as
http:https://localhost:3000/api/forge/callback/oauth
-
Postman: This is optional, but recommendable to get 3-legged token. Check the tutorial of Postman Scripts of Model Coordination APIfor details.
-
BIM 360 Account and project: must be Account Admin to add the app integration. Learn about provisioning. Make a not with the account id and project id.
-
Ensure Model Coordination module has been activated in BIM 360 project.
-
Clone this project or download it. It's recommended to install GitHub desktop. To clone it via command line, use the following (Terminal on MacOSX/Linux, Git Shell on Windows):
git clone https://github.com/autodesk-forge/forge-bim360-modelcoordination-walkthrough
This repo contains large RVT sample files and uses
git lfs
, make sure you clone accordingly -
Open the solution file in Visual Studio, ensure dependent packages of nuGet have been installed, and the dependent project Forge has been built and imported to the sample projects successfully.
-
Each sample needs the following input configuration Runtime Configuration
Sample Description AuthToken A valid Forge OAuth 2.0 3-legged authentication token AccountId The BIM 360 Hub (Account) GUID to be used by the samples ProjectId The BIM 360 Project GUID to be used by the samples
Three options are available with this walkthough sample. Please check RuntimeConfig.md for detail steps.
-
Follow the steps in readme of each sample to run the samples.
-
The samples can be also run on cross platform.
5.1 ) Open the sample folder in Visual Studio Code. The samples in this repo consist of a suite of .NET Core Console applications and a web application. To build and run these applications you will require the cross-platform .NET Core SDK.
5.2) In terminal, switch to the folder of the specific sample, type
dotnet restore
to install the required packages and typedotnet build
to build the sample:PS > cd ./samples/{sample_folder} PS > dotnet restore PS > dotnet build
5.3) After the steps above, type
dotnet run
in the terminal to run the sample.PS > cd ./samples/{sample_folder} PS > dotnet run
- Model Coordination API
- Model Coordination API SDK
- BIM 360 API and App Provisioning
- Data Management API
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
- Don Whittle, Model Coordination engineering team, Autodesk.
- reviewed by Xiaodong Liang @coldwood, Forge Partner Development,Autodesk