Search code examples
autodesk-forgeautodesk-viewer

On click of Modal Browser button - Showing empty data from modal panel


I am rendering Revit 3D modal based on the sourceURNFile from forge viewer.

Use Case :

On click of Modal Browser, we are not able to view any of the modal browser information.

Please suggest do we need to set any setting configuration to render the modal browser data.

I have attached a screenshot for the reference. screenshot


Solution

  • Judging from the strange position of the viewer toolbar, it looks like there could be some issue with the CSS layout. It's possible that the Model Browser is actually populated with data, but it's just collapsed. Try inspecting the HTML of the Model Browser and see if it has any content. If it does, you might want to check and fix the CSS. Another way to test if this is a CSS issue would be to upload your Revit model to another Forge application, for example, https://viewer.autodesk.com, and see if it has the same problem.

    If the layout is not the issue, try checking if the Revit model has any tree at all (some types of input files may not have any tree/hierarchy, but Revit models should). In your web application, open the browser dev tools and try the following command:

    let tree = NOP_VIEWER.model.getInstanceTree();
    let root = tree.getRootId();
    tree.enumNodeChildren(root, console.log, true);
    

    The instance tree data structure is what's shown in the Model Browser. If the instance tree is not available in your app, there might be another issue. In that case I would recommend that you send us an email to forge (dot) help (at) autodesk (dot) com with all the details, if possible, incl. the source code and the Revit model, so that we could debug it on our end.