Warm tip: This article is reproduced from stackoverflow.com, please click
autodesk-forge autodesk-model-derivative autodesk-viewer

How to implement 'Autodesk.AEC.LevelsExtension' and 'Autodesk.AEC.Minimap3DExtension'

发布于 2020-05-04 19:06:13

I have tried to implement 'Autodesk.AEC.LevelsExtension'. and 'Autodesk.AEC.Minimap3DExtension' but it doesn't work for me. I have implemented what you recommend in the post https://forge.autodesk.com/blog/new-rvt-svf-model-derivative-parameter-generates-additional-content-including-rooms-and-spaces

I use the following to convert the model, but I still don't have information about the levels.

  var format_type = "svf";
  var format_views = ["2d", "3d"];
  Axios({
    method: "POST",
    url: "https://developer.api.autodesk.com/modelderivative/v2/designdata/job",
    headers: {
      "content-type": "application/json",
      Authorization: "Bearer " + access_token,
      'x-ads-force': true
   },
   data: JSON.stringify({
   input: {
    urn: urn
   },
   output: {
    formats: [
      {
        type: format_type,
        views: format_views,
        "advanced": {
          "generateMasterViews": true
          }
        }
      ] 
    }
  })
})

Note: I use the Autodesk rac_basic_sample_project.rvt and rac_advanced_sample_project.rvt models

enter image description here

Questioner
RENZO GIANCARLO RIOS RUGEL
Viewed
77
RENZO GIANCARLO RIOS RUGEL 2020-02-19 00:41

We were able to find the solution by using the downloadAecModelData () method

function onDocumentLoadSuccess(viewerDocument) {
  var defaultModel = viewerDocument.getRoot().getDefaultGeometry();
  viewer.loadDocumentNode(viewerDocument, defaultModel);
  viewerDocument.downloadAecModelData() 
}