问题描述
如何在2D查看器中使用dbid获取对象的位置(x和y)?带有dbid的对象的属性如何? 2D文件的格式为dwg.
How can I get location (x and y) of object with dbid in 2D viewer? What about properties of object with dbid? The format of the 2D file is dwg.
推荐答案
您可以使用getSelection()方法,然后使用getProperties(dbid, onSuccessCallback, onErrorCallback)
获取ID的属性.返回属性后,该方法将引发onPropertiesReady事件.
You can use getSelection() method followed by getProperties(dbid, onSuccessCallback, onErrorCallback)
whichGets the properties for an ID. Once the properties are returned, the method raises a onPropertiesReady event.
您可以在此处查看文档. https://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/viewer3d/
You can check the Documentation here. https://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/viewer3d/
这篇关于如何在2D中使用Dbid获取位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!