Building a Forge Web Viewer

Web-based “BIM” solutions are the last big trend, and Autodesk is among the most advanced player in this area with their API offering called Forge.

Autodesk Forge is a product from Autodesk that don’t come with a user interface. Instead, it is designed to be used through other software, and especially web-based solutions. Autodesk Forge is also the technology behind most of the web-based product of Autodesk, like BIM 360 Team, Docs or the A360 Online File Viewer.

The community around these products is growing, and new resources and samples are published on an almost daily basis.

Among them, Augusto Gonzales recently wrote a comprehensive tutorial to build a small web viewer using Autodesk Forge and ASP.NET. Being more of a .NET programmer, I took on this opportunity to learn more about this new product and build my own web-based Forge viewer.

I start by creating an ASP.NET Core MVC Web Application with this tutorial. ASP.NET Core being a web framework developed by Microsoft, you can use your C# skills to “easily” build web application.

I follow the detailed explanations from Augusto Gonzales to send my model to the Autodesk server for conversion, get an GUID back and use it to display my model in the Forge viewer. The explication on the blog are straightforward, and I won’t delve into it. I just had to made some few changes since I am using a different version of the ASP.NET Core framework.

Using technologies from Microsoft, it is easy to publish my application on Azure, the Microsoft cloud hosting solution.

I called the end-result Termite, and it is available here.

The Termite Web Viewer

By default, you see a model of my neighborhood from my last post, but you can also upload your own files. A word of caution, uploading and translating a large model can take quite some time, do not close the windows until your model is displayed on the screen.

I also add some features to the viewer. You can lock the rotation of the view by clicking on the lock icon. I also put in place a very basic section tool. To use the section, click on “Add a section” and select a face in the model to create your section.

Viewer Extensions

These features are built as extension of the Autodesk Forge Viewer, are written in JavaScript and run in the browser of the end user.

The source code is available on GitHub. Seasoned web developer will probably find a lot to correct in my application, but I hope to improve with practice

I still have a lot to learn in this area, so you might expect some other web app in the next few weeks.

12 thoughts on “Building a Forge Web Viewer

  1. Hi Simon, very good post as always. If I may ask you a question that has nothing to do with the post, are you familiar with Trimble Connect ? it is as good as Bimsync (thought Bimsync is not for free) ? I’m planning to use Trimble connect for synthesis in the conception of a dam + a power house. Could you please recommand any BIM software or plateform that might be up for the task ?
    I’m very grateful to you.

    • Hi, and thanks !
      I am using Trimble Connect on one of my project currently. I found it quite powerfull, but not as user-friendly and well-thought than bimsync.
      Of course, you can use it to share and review models. However, if you need more advanced features like clash detection, I would recomend a fully-fledge coordination software like Solibri Model Checker or Navisworks.

      • Thanks for the quick reply. My only problem with Bimsync is that it is not for free and I have a long list of people that need to be included in the projet.
        However, the combination of Trimple Connect + Navisworks manage definitely works better in terms of licences for the company I work for.
        Anyway thank you very much, I’ll let you how it goes. Merci Bien !

  2. Hi Simon, very good post as always. If I may ask you a question that has nothing to do with the post, are you familiar with Trimble Connect ? it is as good as Bimsync (thought Bimsync is not for free) ? I’m planning to use Trimble connect for synthesis in the conception of a dam + a power house. Could you please recommand any BIM software or plateform that might be up for the task ?
    I’m very grateful to you.

Leave a Reply

Your email address will not be published. Required fields are marked *