切换模型时更新数据面板

Update datapanel when the model is switched

我有一个与我的 autodesk 帐户关联的应用程序,我还有一个面板仪表板,可以从当前模型加载数据,问题是当我在中心选择另一个模型时,这个面板没有更新。

我试图找到可以记录这一步的 Autodesk.viewing.EVENT 但我找不到。所有这些都已经尝试过,但没有成功...

Autodesk.Viewing.GEOMETRY_LOADED_EVENT,

Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT,

Autodesk.Viewing.MODEL_ADDED_EVENT...

我已经开始工作了。不用担心事件,它工作正常。 以下是我的更改和补充: PanelBarChart.js(饼图也一样)

loadWithCustomProperty(property) {
    this.propertyToUse = property;
    this.chart.destroy();
    this.drawChart();
}

在 dashboard.js 中创建列表后,添加更改事件:

$('#'+_this._selectcontainer).change(function() {
        console.log($('#'+_this._selectcontainer+' option:selected').text())
        _this._panel.loadWithCustomProperty($('#'+_this._selectcontainer+' option:selected').text())            
    });   

这里_this._selectcontainer是UUID,因为要添加多个chards,所以id需要是唯一的。