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.

  • 相关阅读:
    基础档案后台CO应用实例_存货档案自动同步功能
    U8应收管理Co单据
    U8供应链各业务单据CO功能
    jq判断是PC还是手机端的方法
    C#下OCX控件的完美使用
    如何使用C#调用U8的COM组件之四 Interop合并方案
    如何使用C#调用U8的COM组件之三 繁多的Interop
    如何使用C#调用U8的COM组件之二 利器与初探
    如何使用C#调用U8的COM组件之 一前言
    【vue】table动态加载图片时,遇到图片不显示问题
  • 原文地址:https://www.cnblogs.com/junqilian/p/5149756.html
Copyright © 2011-2022 走看看