Accessing BIM 360 Design models on Revit

July 19, 2018

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",
            ....
         }
      }
   },
   ....
}

Posts by author

Augusto Goncalves
Developer Advocate, Autodesk

Developer Advocate at Autodesk since 2008, working with both desktop and web/cloud apps using top technologies, like C#, JavaScript, NodeJS and any other that can solve problems and improve workflo