July 19, 2018

Accessing BIM 360 Design models on Revit

Default blog image

The Revit 2019 desktop .NET API offers the ability to open a BIM 360 Design (formerly Collaboration for Revit, or C4R) model from its location on the cloud. See item 1.5 here. To use ModelPathUtils.ConvertCloudGUIDsToCloudPath(Guid, Guid) we need the respective GUIDs, how to get that?

Forge Data Management API allows us to navigate from BIM 360 accounts (i.e. Hubs), then projects, folders, and items. This last is the file, but it can have multiple versions, and that's what we need: a specific version! The response from GET Versions contains an array of versions, on each we should look into the .attributes.extension.data, where we can see the projectGuid and modelGuid, see code snippet below. That's it.

Don't know how to use Forge on your desktop .NET application/plugin? Check this blog post for details.

{  
   "type":"versions",
   "id":"urn:adsk.wipprod:fs.file:vf.abcd1234?version=1",
   "attributes":{  
      "name":"fileName.rvt",
      "displayName":"fileName.rvt",
      ...
      "mimeType":"application/vnd.autodesk.r360",
      "storageSize":123456,
      "fileType":"rvt",
      "extension":{  
         "type":"versions:autodesk.bim360:C4RModel",
         ....
         "data":{  
            ...
            "projectGuid":"48da72af-3aa6-4b76-866b-c11bb3d53883",
            ....
            "modelGuid":"e666fa30-9808-42f4-a05b-8cb8da576fe9",
            ....
         }
      }
   },
   ....
}

Related Posts

May 9, 2019

Basic point clouds in Forge Viewer

Developers often ask us whether point clouds are supported in Forge Viewer. Unfortunately, the official answer is "no".

Read More

May 9, 2019

Changes on OSS upload and download for scriptable plain text files [security improvement]

Starting June 12, the OSS upload PUT endpoints will return an HTTP 400 status code if content disposition inline and content types is one of the following:

Read More

May 9, 2019

Quick deployment of Forge applications to Azure

Microsoft Azure has recently introduced Azure Resource Manager (or ARM) - a service for

Read More