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.

  • 相关阅读:
    PHP-redis命令之 列表(lists)
    PHP-redis命令之 散列(hashes)
    PHP-redis命令之 字符串 (strings)
    CentOS 7.0:搭建SVN服务器
    Redis 数据类型分析 字符串 哈希 列表 集合 有序集合 优缺点 分析 注意事项 存储结构
    CentOS 7安装配置Redis数据库
    封装微信分享到朋友/朋友圈js
    PHP 微信分享(及二次分享)
    Ajax登陆,使用Spring Security缓存跳转到登陆前的链接
    IDEA thymeleaf ${xxx.xxx}表达式报错,红色波浪线
  • 原文地址:https://www.cnblogs.com/junqilian/p/5149756.html
Copyright © 2011-2022 走看看