November 10, 2019

New RVT->SVF Model Derivative parameter generates additional content, including rooms and spaces.

In early September, an update of Model Derivative API service was released. The release notes are here: https://forge.autodesk.com/en/docs/model-derivative/v2/change_history/changelog/

The main aspect of this release is a new request body “advanced” parameter named generateMasterViews. The parameter only applies to SVF output, with Revit RVT input. This is also documented under the SVF format here: https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/

To use this new parameter, you can add it to the SVF request body of the POST job endpoint like this:

curl -X 'POST' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -H 'Authorization: Bearer PtnrvrtSRpWwUi3407QhgvqdUVKL' \
     -H 'x-ads-force: true' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job' \
     -d
      '{
         "input": {
           "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL21vZGVsLmlmYw",
         },
         "output": {
           "formats": [
             {
               "type": "svf",
               "views": [
                 "2d",
                 "3d"
               ],
               "advanced": {
                 "generateMasterViews": true
               }
             }
           ]
         }
       }'

Note that this parameter also requires the x-ads-force header value to be set as true

What does this mean? This new translation option will generate an extra “master” view of each Revit Phase. For example, the sample project “rac_basic_sample_project.rvt” contains rooms that are labeled on the Level 1 and Level 2 floor plans. Prior to the new generateMasterViews parameter (or now this parameter being set to false, which is the default), the rooms would not be in the model because they are not part of the 3D view. According to the docs, master views are defined as “3D views that are generated for each phase of the Revit model. A master view contains all elements (including “room” elements) present in the host model for that phase. The display name of a master view defaults to the name of the phase it is generated from. However, if a view with that name already exists, the system appends a suffix to the default display name.”

If we take a look at the sample project “rac_basic_sample_project.rvt”, it contains two phases called “Working Drawings” and “Learning Content”. After we generate the derivatives the manifest will show there are two new viewables:

{
    "guid": "75ddc022-2fc2-cfc5-2fe8-8ccf72d25ea7",
    "type": "geometry",
    "role": "3d",
    "name": "Working Drawings",
    "viewableID": "c884ae1b-61e7-4f9d-0001-719e20b22d0b-0010d056",
    "phaseNames": "Working Drawings",
    ...
},
{
    "guid": "303a794c-a168-c792-c7e3-c7b1d93ad01a",
    "type": "geometry",
    "role": "3d",
    "name": "Learning Content",
    "viewableID": "c884ae1b-61e7-4f9d-0002-719e20b22d0b-0010d062",
    "phaseNames": "Learning Content",
    ...
},

 

Using Petr Broz’s awesome VS Code tool, we can also see it there:

 

When you view the new derivatives, you will be looking at a “master view” and this will contain information not previously available via model derivative translations (although BIM 360 has been providing this information).

For example, looking at the “Working Drawings” view, we can now see it is listing the rooms (by default they are hidden, like they would be in the Revit 3D model, but you can easily toggle this and now inspect them in the context of the 3D model.)

 

This can also include spaces and zones from an MEP project. Let’s look at the “rme_advanced_sample_project.rvt” project using the generateMasterViews parameter. We can see there are space elements showing now, too: