祝顺利~~~ /** * 初始化viewer * @function L_GetAllDbIds * @param {object} model forgeviewer的模型句柄 */ function L_GetAllDbIds(model) { let instanceTree = model.getData().instanceTree; let allDbIds = Object.keys(instanceTree.nodeAccess.dbIdToIndex); return allDbIds; } // 拿到模型队列 let _modelList=viewer.impl.modelQueue().getModels(); // 拿到你想要的东西 _modelList.map(model=>{ let list=L_GetAllDbIds(model); console.log(" >LJason< 日志:dbId",list); });
祝顺利~~~