1. 程式人生 > >View and Data API Tips : Conversion between DbId and node

View and Data API Tips : Conversion between DbId and node

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.

相關推薦

View and Data API Tips : Conversion between DbId and node

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 eleme

View and Data API Tips: Constrain Viewer Within a div Container

When working with View and Data API, you probably want to contain viewer into a <div> tag, the position and size of <div> can be defined with

View and Data API Tips: Hide elements in viewer completely

With View and Data API, you can hide some elements in viewer by calling “viewer.hide(dbIds)”, when the elements are hided, it actually make it transparen

Using View and Data API with Meteor

I have been studying Meteor these days, and find that Meteor is really a mind-blowing framework, I can talk about this latter. I was inspired by this que

使用AxisHelper幫助理解View and Data API中的座標系統

大家使用View and Data API做三維模型開發,必然首先要理解View and Data API的座標系統,即XYZ三個軸向分別是怎麼定義的。Three.js裡面提供了一個AxisHelper,但如果你直接運用的話,你會發現在viewer中並不顯示,並且控制檯中會有這樣的錯誤資訊:"Only THR

Autodesk View and Data API二次開發學習指南

什麼是View and Data API? 使用View and Data API,你可以輕鬆的在網頁上顯示大型三維模型或者二維圖紙而不需要安裝任何外掛。通過View and Data API,你可以對模型進行視點控制、選擇控制、屬性資訊查詢等等,而且還可以把這樣無外掛的模型瀏覽器和您自己的其他資訊系統整合

View and Data API中更改指定元素的顏色

大家在使用View and Data API開發過程中,經常會用到的就是改變某些元素的顏色已區別顯示。比如根據某些屬性做不同顏色的專題顯示,或者用不同顏色表示施工進度,或者只是簡單的以顏色變化來提醒使用者以示區別。作為開發者,一定會喜歡看的這樣的API://load the extension viewe

Top 10 Machine Learning, Deep Learning, and Data Science Courses for Beginners (Python and R)

Data Science, Machine Learning, Deep Learning, and Artificial intelligence are really hot at this moment and offering a lucrative career to programmers wi

Android Architecture: Communication between ViewModel and View

Android Architecture: Communication between ViewModel and View https://android.jlelse.eu/android-architecture-communication-between-viewmodel-a

Odoo12 ORM API ☞ Compatibility between new API and old API

Compatibility between new API and old API(新舊API之間的相容性) Odoo目前正在從較舊的(較不常規)API轉換,有時可能需要手動的將一個API手動轉換到另一個API: RPC層(XML-RPC和JSON-RPC)都是用舊API表示

Choosing between Redux and React’s Context API

Choosing between Redux and React’s Context APIWhile I worked on a recent project at work, I had to implement filtering and sorting (for a table) through so

建立View and Data – 3D模型

View and Data – 3D模型 (轉自:blog.csdn.net/zzzh2088/article/details/64921162) 1、建立展示3D模型的容器,引入必要的css和js檔案 <!DOCTYPE html> <head&

What is the difference between Kill and Kill -9 command in Unix?

data esp osi lin mil print ren win sku w difference kill -9 pid and kill pid command - Ask Ubuntu https://askubuntu.com/questions/7918

between-flink-and-storm-Spark

-s stack https storm and main sta blank link https://stackoverflow.com/questions/30699119/what-is-are-the-main-differences-between-flink-

Flash program memory and data EEPROM

corrupted check stat blog 編程 其中 per pri param 1、簡介   STM8S內部的FLASH程序存儲器和數據EEPROM是由一組通用寄存器來控制的;所以我們可以通過這些通用寄存器來編程或擦除存儲器的內容、設置寫保護、或者配置特定的低功

Relationship between frequency and spatial in digital images

log 兩個 表示 title cal .com 關系 show tla 今天又復習了一遍<<Digital Image Processing>>的第四章,為了加深對頻域的理解,我自己用PS畫了一張圖。如下: 然後做FFT,得到頻譜圖如下:

CF676E:The Last Fight Between Human and AI

tdi sca color 每次 %d out 。。 mat scanf 人類和電腦在一個多項式上進行博弈,多項式的最高次項已知,一開始系數都不確定。電腦先開始操作,每次操作可以確定某次項的系數,這個系數可以是任意實數。給出一個博弈中間狀態,最後如果這個多項式被x-K整除就

並發與並行的區別 The differences between Concurrency and Parallel

並發與並行 mark 並行執行 程序 log tween 計算 線程 currency 邏輯控制流 在程序加載到內存並執行的時候(進程),操作系統會通過讓它和其他進程分時段占用CPU(CPU slices)讓它產生自己獨占CPU的假象(同時通過虛擬內存讓它產生獨占內存的假

[HTML5] Inlining images with SVG and data URIs

mtu pan -h too tty pps ffffff row nts The main reason you want to do I"nlining images with SVG and data URIs" is to reduce http request.

【Django錯誤】OSError: raw write() returned invalid length 14 (should have been between 0 and 7)

安裝 opera 系統 package put handle out app brush 錯誤環境 使用Django框架創建完models類的之後,用python manage.py migrate命令來生成數據庫表的時候出錯 錯誤代碼 Operations to