Lab5 Forge API Intro – Get Properties & Search

(This is a continuation from the previous post: Lab4 “Forge API Web Intro JS”)

This post was prompted by an inquiry about accessing properties of Revit model using Forge API. He left a comment saying that he followed my tutorial and was able to view the uploaded model successfully. So let’s take Forge API Intro Lab4 as a starting point and build on top of it. In this post, we are going to add two functionalities that allow you to:

  • Select an object and obtain its properties
  • Search the model for a given string and isolate them in the viewer

Continue reading “Lab5 Forge API Intro – Get Properties & Search”

Advertisements

Lab4 Forge API Web Intro JS

(This is a continuation from the previous post: Lab3 “Forge API Web Intro”)

Now that we have a model uploaded to our bucket and translated for viewing, the final piece of functionality that we want to add is an ability to view the uploaded model in a html page. To do this, Forge API provides a client side JavaScript API.

In this lab, we make a basic viewer, which is based on Basic Viewer Step-by-Step Tutorial and is slightly modified to put it in the context of our lab and make it easier to built on top of what we have built in the previous lab.

Continue reading “Lab4 Forge API Web Intro JS”

Lab3 Forge API Web Intro

(This is a continuation from the previous post: Lab2 “Forge API Intro”)

In the previous lab, we wrote a desktop client application that creates your own custom storage in the cloud, uploads a file to that storage, and translates it for viewing. Those core functions that we wrote to make REST calls can be easily included in your authoring tools, such as Revit and AutoCAD. Next, we write a simple ASP.NET web application. For now, we keep the basic functionality same as Lab2 (i.e., authenticate, create a bucket, upload a file, and translate). Later in the Lab4, we will add JavaScript layer to embed a viewer.

The good news is that we have written the functions to make the Forge web services REST calls in a way that we can simply reuse them. In the sample project, we put the common Forge REST calls under Forge folder. You can simply copy the folder to your web application if you have followed the labs 1 and 2.

Continue reading “Lab3 Forge API Web Intro”

Lab2 Forge API Intro

(This is a continuation from the previous post: Lab1 “Hello Forge World”)

In Lab1, we learned how to obtain an access token and got familiarized ourselves with the basics of REST call. Let’s move on, and create our own storage, upload a model and make it ready for viewing.

To achieve this, we use the following services:

where oss stands for Object Storage Service.

Continue reading “Lab2 Forge API Intro”

Lab1 Hello Forge World

(This is a continuation from the previous post: Forge API Intro Labs Overview)

In this lab, we learn the first step into the Forge world and the basic of REST API call. This is a simple Windows Forms application written in C#. The Forge services we use in this lab is POST authenticate, which is a call to obtain a two-legged authentication token required for subsequent calls.

To make REST calls, we use a library called RestSharp. We chose this as the syntax of RestSharp nicely reflects the semantics of REST call and makes it easy to read the code even if you aren’t writing in C#. Please refer to this post about how to include RestSharp library to your project.

Continue reading “Lab1 Hello Forge World”

Forge API Intro Labs Overview

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.

Continue reading “Forge API Intro Labs Overview”

BIM 360 Docs Account for Development

As we finish the BIM 360 focused webinars, we are receiving requests for BIM 360 Docs account for development. I talked about it in the second webinar. Here is the instruction to make it easy to find by googling.

  • ADN members – if you are an ADN member, you can request a developer version of license from the ADN extranet: adn.autodesk.io >> Development Software and Web Services Request Form.
  • Paid account owners – If you already have a paid BIM 360 Docs account, you can use your own account. (If you do not see “Apps and Integration” tab under SETTINGS tab of Account Admin module, you don’t have an access to API. You will need to request to activate it. Please refer to this post for where to make a request.)
  • If neither of above applies to you, you have two choices:

Continue reading “BIM 360 Docs Account for Development”

Materials from BIM 360 Online Hackathon Webinars

We just finished BIM 360 focused webinar series. The webinars were a part of BIM 360 Hackathon, the online event lasting for three months from August 1st to October 31st. The event is to kick off the opening of the new App Store for BIM 360. (Yes, we have App Store for BIM 360 now!) Currently, the store shelf only has apps that are “home grown”. The idea of the webinars is to help developers jump start implementing web service applications using BIM 360 and Forge.

If you missed the webinars, no worries. The webinars were recorded and are posted to the YouTube. I’m adding the links to the recording along with the presentation slides below.

Continue reading “Materials from BIM 360 Online Hackathon Webinars”

No “Custom Integrations” tab?

Update on 11/29/2017. “Apps & Integrations” tab was renamed as “Custom Integrations”.

To access data stored in BIM 360 Docs through API, you need to manually “provision” your app first. This is done in “Account Admin” page >> “Settings” tab >> “Custom Integrations” >> “Add Custom Integration”:

DocsCustomIntegrations

Continue reading “No “Custom Integrations” tab?”

Folder Creation API for BIM 360 Docs

API to create a folder in BIM 360 Docs is finally available. Before you go back to your code and try it out yourself, however, I should point out a few things that you may want to be aware:

  • It uses commands (not POST-project-folders end point)
  • It supports in the user context only: i.e., 3-legged authentication and 2-legged with x-user-id specified. No full 2-legged is supported at this time.

Note that BIM 360 Team and other A360 based data management service uses POST-projects-folders endpoint to create a folder; the command version does not work for them. These may potentially add confusion if you are not aware up front. BIM 360 Docs team is aware of these gaps and will continue to work on to provide consistent, full 2-legged support at later time. For now, most importantly, we have a way to create folder!  Let’s take a look.

Continue reading “Folder Creation API for BIM 360 Docs”