Skip to content

xiaodongliang/forge-bim360-modelcoordination-walkthrough

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIM 360 Model Coordination API Walkthrough in .NET Core

.NET Core 3.1

oAuth2 Data-Management Viewer BIM-360

BIM 360 Model Set BIM 360 Clash BIM 360 Index

License Level

Description

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.

Available Samples

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.

Setup

Prerequisites

  1. Knowledge of model coordination

  2. .NET Core: The console applications currently target netcoreapp3.1 and have a single netstandard2.1 dependency. You will need .NET Core 3.1 SDK installed. The samples can also work with netcoreapp3.0, but since AuthWeb ASP.NET Core Blazor WebApp depends on netcoreapp3.1, it is recommended use netcoreapp3.1 with all samples. To test on cross-platform, ensure .NET Core 3.1 SDK has been installed.

  3. 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://localhost:3000/api/forge/callback/oauth

  4. Postman: This is optional, but recommendable to get 3-legged token. Check the tutorial of Postman Scripts of Model Coordination APIfor details.

  5. 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.

  6. Ensure Model Coordination module has been activated in BIM 360 project.

Running Locally

  1. 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

  2. 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.

  3. 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.

  1. Follow the steps in readme of each sample to run the samples.

  2. 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 type dotnet 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

Further Reading

Tutorials

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

About

BIM 360 Model Coordination walkthrough sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published