Change content of Model Browser in Forge Viewer

走远了吗. 提交于 2019-12-24 21:26:05

问题


Is there an easy way to change the content of Model Browser in the Forge Viewer? I would like to rename som nodes, add and remove node.


回答1:


Unfortunately Model Browser sources its data from the object tree (model.getInstanceTree()) which is immutable and can only be extended by re-creating your own data structure.

Here’s a couple of good starting points:

  • Data Structure: https://forge.autodesk.com/blog/supporting-multiple-models-new-modelstructurepanel

  • Behavior: https://forge.autodesk.com/blog/customizing-modelstructurepanel-behavior-forge-viewer

  • Code Sample: https://github.com/yiskang/forge-au-sample/tree/master/model-structure



来源:https://stackoverflow.com/questions/53792642/change-content-of-model-browser-in-forge-viewer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!