Copyright © Bentley Systems, Incorporated. All rights reserved.
An iTwin sample application that demonstrates following workflows using the Library API.
- Upload a component to a catalog
- Query and download components from a catalog
- Create a component and its referenced entites i.e. catalog, manufacturer, application and category. Create and get component related entities i.e. document, variation and webLink.
This application contains sample code that should not be used in a production environment. It contains no retry logic and minimal logging/error handling.
- Git
- Visual Studio 2019 or Visual Studio Code
- .NET 5.0
-
Clone Repository
-
Open iTwinLibrarySampleApp.sln and Build
-
(Optional) Put breakpoint in Program.cs
-
Run to debug
-
It will require a user token.
- Go to the Library API developer portal
- Click the TryIt Button
- In the popup window, select authorizationCode in the Bentley OAuth2 Service dropdown
- This will popup another window that will require you to login.
- After you login, the Authorization header will be populated. Copy the entire string and paste into the command window for the iTwin Sample Library App.
- Press Enter
-
You can now step through the code that will create and manage component and related entites.