In the next few posts, I’m going to write about the introduction to Forge API. This is a revised version of what I have done as “View and Data API Intro Labs” a few years back, which was unfortunately outdated now. The goal of the labs is to learn the basic of Forge API through building a simple application to view a design model in a web browser. In the back of my mind, I’m also thinking this as a preparation for Design Automation for Revit (DA4R), which is expected to come near future. For example, to use DA4R, the developer will need to use authentication API. He/she may want to take a Revit file from A360 or BIM 360 and display the result in the viewer. I hope Revit add-on developers who are new to Forge API will find these labs easy to digest.
Autodesk Forge is a collection of web services and various platform technologies that allows the third party developers to integrate with Autodesk’s cloud-based products as well as to build their own applications. They are technologies that Autodesk internally uses to build its own services as well.
One of popular functionalities in Forge is Viewer. The third party developers can embed Forge Viewer in their web page to view a design model in a browser without needing to install any application. It’s the same technologies that you see in A360, BIM 360 Docs when you are viewing a design model, such as Revit file.
While I’m writing this labs instruction, I should note that there are plenty of materials about Forge API already. There are a couple of versions of getting started available. Samples are written in various programming languages. Many of them covers advanced functionality and suitable for demonstration. They are posted on the github and available for anybody who is interested in trying out. For your reference, I have included the list of links to the existing materials at the bottom of this post. A bit of drawback of pointing to those existing materials is that there are so many. It’s a little overwhelming when you are trying to look for the first time. My intention here is to provide THE minimum sample focusing on the logic of the first basic steps to view a model.
Note: If you are interested in integrating with A360 and BIM 360 Docs/Team, there are additional API’s to navigate through hubs and projects with those products. I intend to cover them later. In this lab series, we use a custom storage called OSS (Object Storage System) instead of A360 or BIM 360. But basically both use the same Forge API’s.
Here are the steps I’m going to follow:
- Lab1 “Hello Forge World” – this is the minimum project which shows an authentication REST call. If you are new to REST API, it will give you a good picture of what REST API looks like.
- Lab2 “Forge API Intro” – this lab shows what it takes to make a file ready for viewing.
- Lab3 “Forge API Web Intro” – we then convert a client win forms application written in Lab2 to a web application.
Here is a list of the existing materials I know of as references. Please be warned that these pages are continuously updated. They may change anytime.
1. Getting started
- Autodesk Forge – Getting Started — Introduction to various Forge API.
- Autodesk Forge – SDK Quick Start — A version on developer.autodesk.com, with SDK, which wraps REST calls with various languages.
- Forge API Webinars — A collection of links to the materials from Forge API webinars. There include presentation slides as well as recordings. The page is from BIM 360 Hackathon in 2017. But the presentations about each component are common across different forge-based products.
- Forge Viewer Getting Started Tutorial in Node.js — Node.js version of getting started.
- developer.autodesk.com — This is the main entrance page to Autodesk Forge. You will need to come here to register your apps and get client ID and secrets. You will also find links to various site about Forge API. More specifically, following pages will be good starting points:
- Create an App — step-by-step instruction on how to get client ID and secret.
- Basic Viewer — step-by-step tutorials for a basic viewer.
- Create an App-Managed Bucket and Upload a File — tutorial to create a custom storage and upload your file.
- Prepare a File for the Viewer — tutorial to translate or convert a file for viewing.
- Samples on GitHub — Wide range of samples are available on this site.
4. Blog and Forums
- Forge Community Blog — A blog by Forge and DevTech members.
- Questions on StackOverflow — If you have any questions, this is a place you can search and ask questions.
- Forge API for BIM 360 — I also put together a list of Forge related posts in my blog. This is more from BIM 360 perspective.
Next: Lab1 “Hello Forge World”