1 Dec 2020

Root object not visible in Model browser

When you load your Inventor assembly in the Viewer then the root object is not listed in the Model browser. Because of that you cannot even select that object and see the file's properties in the Properties palette

However, if you check the same model on https://viewer.autodesk.com/, then the root object is visible and when you select it the file's properties will be listed in the Properties palette - see picture on top.

There is an option called modelBrowserExcludeRoot that was exposed and got set to true by default in version 5 of the Viewer:
https://forge.autodesk.com/en/docs/viewer/v6/change_history/changelog_v5/ 

Expose config3d.modelBrowserExcludeRoot to configure whether 
the Model Browser will display the model’s root node or not 
(default is to not display it)

You just have to set it to false when creating the Viewer:

Autodesk.Viewing.Initializer(options, () => {
  viewer = new Autodesk.Viewing.GuiViewer3D(
    document.getElementById('forgeViewer'), 
    { 
      extensions: [ 'Autodesk.DocumentBrowser'],
      modelBrowserExcludeRoot: false 
    }
  );
  viewer.start();
  var documentId = 'bubble.json'; 
  Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
});

Now it's there ?

Root object visible in Model browser  

Related Article