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.

  • 相关阅读:
    Java 签名(SHA1WithRSA、SHA256WithRSA、SHA256withECDSA)
    记一次用WireShark抓包摆脱Si服后台限制的过程
    反向代理Nginx
    对于新能源Can数据、电池BMS等字节和比特位的解析
    WireShark抓包命令
    .NET下寄宿于控制台的HTTPS监听
    RSA等非对称加密为什么要用公钥加密,而用私钥解密?
    FTP、SFTP与FTPS
    Python打包方法——Pyinstaller
    [Python爬虫]煎蛋网OOXX妹子图爬虫(1)——解密图片地址
  • 原文地址:https://www.cnblogs.com/junqilian/p/5149756.html
Copyright © 2011-2022 走看看