从加载的模型中获取所有对象的列表 [英] Get a list of all objects from loaded model
问题描述
我需要从当前加载的模型中的所有对象中获取所有属性.
I need to get all the properties from all the objects in the currently loaded model.
如果我有所有dbId的列表,则可以使用Autodesk.Viewing.Viewer3D.getProperties(dbid,onSuccessCallback,onErrorCallback)
方法检索它们.
If I have a list of all the dbIds, I can use the Autodesk.Viewing.Viewer3D.getProperties(dbid,onSuccessCallback,onErrorCallback)
method to retrieve them.
是否可以获取查看器中所有对象的dbId列表?还是有更好的方法来实现这一目标?
Is there a way to get a list of the dbIds of all the objects in the viewer? Or is there a better way to achieve this?
推荐答案
以下是获取模型中所有dbId的方法: 在模型
Here is how you can get all the dbIds in the model: Get all database id's in the model
现在,我们还有一个函数来检索Viewer中多个元素的属性: getBulkProperties方法
Now we also have a function to retrieve properties for multiple elements in the Viewer: getBulkProperties method
我认为以上两件事就是您所需要的.
I think the above two things are all you need.
这篇关于从加载的模型中获取所有对象的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!