All Projects → Autodesk-Forge → forge-viewhubs-desktop

Autodesk-Forge / forge-viewhubs-desktop

Licence: MIT license
Autodesk design file explorer for desktop: Demonstrates a desktop application that shows BIM 360 Team, BIM 360 Docs and Fusion Team hubs, which respective Projects, Folders, Items and Versions

Programming Languages

C#
18002 projects
Classic ASP
548 projects
HTML
75241 projects

Projects that are alternatives of or similar to forge-viewhubs-desktop

forge-bucketsmanager-desktop
View, Upload & Translate models: Desktop sample tool (.NET) to manage bucket, objects and translations (extract SVF)
Stars: ✭ 44 (+41.94%)
Mutual labels:  winforms, autodesk-data-management
topmostfriend
Utility for making windows always be on top, forcefully.
Stars: ✭ 6 (-80.65%)
Mutual labels:  winforms
hotel-management-v2
🏨 Hotel Management App.
Stars: ✭ 25 (-19.35%)
Mutual labels:  winforms
SevenSegment
A full-featured seven-segment control for WinForms.
Stars: ✭ 30 (-3.23%)
Mutual labels:  winforms
WindowsFormsLifetime
.NET Core hosting infrastructure for Windows Forms.
Stars: ✭ 66 (+112.9%)
Mutual labels:  winforms
dot-net-transitions
A library for animated UI transitions for .NET
Stars: ✭ 85 (+174.19%)
Mutual labels:  winforms
FATXTools
FATX Data Recovery Tools (C#)
Stars: ✭ 34 (+9.68%)
Mutual labels:  winforms
LazyTS
PowerShell Script (GUI) to manage Terminal Sessions
Stars: ✭ 85 (+174.19%)
Mutual labels:  winforms
WinForms-KWAssistant
百度搜索关键词,刷点击
Stars: ✭ 16 (-48.39%)
Mutual labels:  winforms
Surviving-WinForms
WinForms ain't going away anytime soon. A lot of us have to deal with it. Let's make the most of it, shall we? 😎
Stars: ✭ 36 (+16.13%)
Mutual labels:  winforms
ganttchart
The Winforms Gantt Chart is the .NET Winforms control originally hosted on CodePlex (http://ganttchart.codeplex.com)
Stars: ✭ 150 (+383.87%)
Mutual labels:  winforms
XamlIslands
Repository with several XAML Islands v1 samples (Win32, WPF, and WinForms) to demonstrate how to use it.
Stars: ✭ 47 (+51.61%)
Mutual labels:  winforms
TheLastTime
C# .NET 5 Blazor WebAssembly Progressive Web Application that tracks when was the last time you did something
Stars: ✭ 23 (-25.81%)
Mutual labels:  winforms
SimpleClassicTheme
No description or website provided.
Stars: ✭ 29 (-6.45%)
Mutual labels:  winforms
Krypton-Toolkit-Suite-NET-Core
A update to Component factory's krypton toolkit to support .NET Framework 3.5 to .NET Core
Stars: ✭ 27 (-12.9%)
Mutual labels:  winforms
DebounceMonitoring
📑 Add debounce logic for any method in a single line.
Stars: ✭ 44 (+41.94%)
Mutual labels:  winforms
XAF Security E4908
This repository contains examples for Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM
Stars: ✭ 47 (+51.61%)
Mutual labels:  winforms
GChan
Scrape boards and threads from 4chan (8kun WIP). Downloads images, videos and HTML if desired.
Stars: ✭ 31 (+0%)
Mutual labels:  winforms
Scraps
Scrap.TF Raffle Joining Bot
Stars: ✭ 24 (-22.58%)
Mutual labels:  winforms
SimpleClassicTheme.Taskbar
Taskbar for Simple Classic Theme
Stars: ✭ 47 (+51.61%)
Mutual labels:  winforms

Desktop app to view models on hubs (BIM 360 or Fusion Team)

Platforms .NET ASP.NET License

OAuth2 Data-Management Viewer

Advanced

Demonstration

This sample demonstrates a desktop application that shows BIM 360 Team, BIM 360 Docs and Fusion Team hubs, which respective Projects, Folders, Items and Versions. For each version it is possible to view it using Viewer.

Uses Data Management to list hubs, projects and files. Uses Viewer to show models on a Chromium-based browser, CefSharp.WinForms. A Mongo database is used to store session (OAuth) information.

Thumbnail

thumbnail

See this quick video.

Architecture

When the user opens the desktop application, it redirects to Autodesk Account sign in page using the Forge Client ID stored on the Cloud module. After authenticating, the access_token and refresh_token are stored on a MongoDB database, creating a session ID. This ID is encrypted and sent to the Desktop client.

On the next request, the Desktop client provides the Session ID, the Cloud module uses that to get the respective access_token and connects to Autodesk. Once the data is acquired, it is adjusted and sent to the Desktop client.

The Desktop client will not have access to the access_token.

Security concerns

This sample uses CefSharp.WinForms, based on Chromium Embedded Framework, the open source version of Google Chrome. It's is also available for WPF applications. The build-in .NET WebView is based on Internet Explorer (version 11) and it's have several limitations.

The Cloud module acts as a proxy between the Desktop client and Autodesk data. Only authorized information is returned, including the viewables for Viewer, controlled via Proxy.

To identify the Desktop client, this sample uses a MachineID identifier. For this first version, it is using the MAC address, but this may be improvements.

Setup

Prerequisites

  1. Forge Account: Learn how to create a Forge Account, activate subscription and create an app at this tutorial.
  2. Visual Studio: At least the Community edition
  3. .NET basic knowledge with C#
  4. MongoDB: noSQL database, learn more. Or use a online version via Mongo Altas (this is used on this sample)

Running locally

For using this sample, you need an Autodesk developer credentials. Visit the Forge Developer Portal, sign up for an account, then create an app. For this new app, use http://localhost:3000/api/forge/callback/oauth as Callback URL. Finally take note of the Client ID and Client Secret.

This sample contains 2 projects: cloud and desktop.

Cloud server

MongoDB

MongoDB is a no-SQL database based on "documents", which stores JSON-like data. For testing purpouses, you can either use local or live. For cloud environment, try MongoDB Atlas (offers a free tier). With MongoDB Atlas you can set up an account for free and create clustered instances, intructions:

  1. Create a account on MongoDB Atlas.
  2. Under "Collections", create a new database (e.g. named desktopsample) with a collection (e.g. named users).
  3. Under "Command Line Tools", whitelist the IP address to access the database, see this tutorial. If the sample is running on Heroku, you'll need to open to all (IP 0.0.0.0/0). Create a new user to access the database.

At this point the connection string should be in the form of mongodb+srv://<username>:<password>@clusterX-a1b2c4.mongodb.net/desktopsample?retryWrites=true. Learn more here

There are several tools to view your database, Robo 3T (formerly Robomongo) is a free lightweight GUI that can be used. When it opens, follow instructions here to connect to MongoDB Atlas.

WebConfig

Open the web.config and edit the Forge Client ID, Secret and Callback URL. The OAUTH_DATABASE should point to your MongoDB instance.

<appSettings>
  <add key="FORGE_CLIENT_ID" value="" />
  <add key="FORGE_CLIENT_SECRET" value="" />
  <add key="FORGE_CALLBACK_URL" value="" />
  <add key="OAUTH_DATABASE" value="" />
</appSettings>

Desktop executable

Open the app.config file and specify the webserver address under appSettings:

<appSettings>
  <add key="serverAddress" value="http://localhost:3000" />
</appSettings>

For local testing, the desktop module should work "as is".

To debug, make sure to launch both projects. On the Solution Explorer, right-click on the solution and go to properties, under Startup Project select both.

Deployment

IMPORTANT: this sample implements minimum error check for simplicity, not ready for production environment.

The cloud project should be deployed live, any .NET compatible host should work, including (but not limited to):

Consider upgrading the mLab account to production.

Then the desktop module should be updated with the cloud module address (under appSettings file).

Further Reading

Documentation:

Blogs on Expanding .NET desktop apps into the cloud

Other APIs:

Tips & Tricks

  1. The CEF Sharp library should work on AnyCPU, but this sample uses only x64 version. This issue entry explains how to adjust it, if needed.

  2. To keep keys locally, the sample defines a web.keys.config file that is added to .gitignore. On local development environment, this file stores the keys. When commit to Github, this file is not included.

  3. The AWS Elastic Beanstalk deployment cannot override web.config variables on deployment, so this sample includes a transform on the web.Release.config to remove them. With that it should work.

<appSettings>
  <add key="FORGE_CLIENT_ID" xdt:Transform="Remove" xdt:Locator="Match(key)" />
  <add key="FORGE_CLIENT_SECRET" xdt:Transform="Remove" xdt:Locator="Match(key)" />
  <add key="FORGE_CALLBACK_URL" xdt:Transform="Remove" xdt:Locator="Match(key)" />
  <add key="OAUTH_DATABASE" xdt:Transform="Remove" xdt:Locator="Match(key)" />
</appSettings>

Troubleshooting

  1. Cannot see my BIM 360 projects: Make sure to provision the Forge App Client ID within the BIM 360 Account, learn more here. This requires the Account Admin permission.

  2. Cloud module cannot load its dependencies: first clean up the solution, then delete the .vs (hidden) and packages folder. Make sure the cloud project is set to AnyCPU and the desktop project is either 32 or 64 bit. Rebuild.

  3. Specified argument was out of the range of valid values:
    This error might come up if the necessary IIS components are not installed on your machine. You can solve it by following the solution here, which basically that you should go to Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services and check the checkbox

  4. Could not find a part of the path: This error can be fixed by updating the packages used by the project. You can follow the solution shown here, which says that you should run the Package Manager Console and execute the following in it:
    Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r

License

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

Written by

Augusto Goncalves @augustomaia, Forge Partner Development

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].