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
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
andAutodesk.Viewing.Extensions.ViewerModelStructurePanel
and modify it. Internal functions allow it to support multi-model usage scenarios.