zoukankan      html  css  js  c++  java
  • View and Data API Tips : Conversion between DbId and node

    By Daniel Du

    In View and Data client side API, The assets in the Autodesk Viewer have an object tree, a tree structure that represents the model hierarchy. Each element in model can be representing as a node of model tree. Each node has a dbId, this is a unique id for the element in the model. There is a one-to-one correspondence between a node and a dbId.

    In View and Data client API, some methods use dbId as parameter and some methods use node as parameter, in that case you will need to do the conversion. To get the node object from dbId, here is code snippet:

     var node = viewer.model.getData()
         .instanceTree.dbIdToNode[dbId];

    To get dbId of a node, just use the dbId property:

    var dbId = node.dbId

    Just a small tip in case you don’t know.

  • 相关阅读:
    React新闻网站--Header组件拆分及样式布局
    React 中的前端路由 react-router-dom
    Bootstrap4 图像形状+Jumbotron+信息提示框+按钮
    Bootstrap4 表格练习
    React好帮手--Ant Design 组件库的使用
    React 中的生命周期函数
    React 中 ref 的使用
    深入理解 Java 线程池
    Elastic 技术栈之 Filebeat
    mysql 开发进阶篇系列 54 权限与安全(账号管理的各种权限操作 下)
  • 原文地址:https://www.cnblogs.com/junqilian/p/5149756.html
Copyright © 2011-2022 走看看