[英]Autodesk Forge - how to get properties of multiple selected objects synchronously
In my Extension I have an ID from this.viewer.getSelection()
array, eg 1234.在我的扩展中,我有一个来自
this.viewer.getSelection()
数组的 ID,例如 1234。
I've tried to get properties from this:我试图从中获取属性:
this.viewer.getProperties(1234,function(data) {console.log(data);},function(e1,e2) {console.log("ERROR:",e1,e2);})
But I see the error:但我看到错误:
Properties failed to load since model does not exist
Updated question: How to get properties of multiple selected objects synchronously ?更新的问题:如何同步获取多个选定对象的属性?
Under the hood, the viewer.getProperties method calls viewer.model.getProperties , and as the error message states, viewer.model
is not available when the method is called.在幕后, viewer.getProperties方法调用viewer.model.getProperties ,并且如错误消息所述,
viewer.model
该方法时viewer.model
不可用。 Note that there could be several different reasons for such scenario:请注意,这种情况可能有多种不同的原因:
viewer.getProperties
is called on a different instance of viewer (which does not have any model loaded)viewer.getProperties
viewer.getProperties
is called before the model has been loadedviewer.getProperties
viewer.getProperties
is called after the model has been unloadedviewer.getProperties
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.