search

Home  >  Q&A  >  body text

javascript - autodesk forge viewer multi-model loading model browser problem

After loading multiple models. In the AGGREGATE_SELECTION_CHANGED_EVENT event

var propertyPanel = Viewer.getPropertyPanel(true);
    propertyPanel.currentModel = model;
    model.getObjectTree(function(instanceTree){
        Viewer.modelstructure.setModel(instanceTree);
    }

Although the model tree in the model browser will change according to the clicked model
, when you click on the element in the red box to hide the component, it will still be the initially loaded model

代言代言2695 days ago1587

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-07-05 10:58:47

    Sorry, the current model browser does not support the use of multiple models. If you want to correct this situation, you can try to override Autodesk.Viewing.UI.ModelStructurePanel and Autodesk.Viewing.Extensions.ViewerModelStructurePanel and modify it. Internal functions allow it to support multi-model usage scenarios.

    reply
    0
  • Cancelreply