![](/img/trans.png)
[英]Autodesk Forge - how to get properties of multiple selected objects synchronously
[英]How to get the properties group names in autodesk forge
在Forge查看器中,属性组未命名为group
。 在这种情况下,它称为category
,可以通过displayCategory
进行访问。 这是一个例子:
var selection = viewer.getSelection();
viewer.getProperties( selection[0], function( result ) {
const props = result.properties;
for( let i = 0; i < props .length; i++ ) {
const property = props[i];
if( property.hidden) return;
const category = props[i].displayCategory;
if( category && typeof category === 'string' && category !== '' ) {
// The property group you want
console.log( category );
}
}
});
顺便说一句,您可以从此博客中查看更多详细信息: https : //forge.autodesk.com/cloud_and_mobile/2015/05/adding-custom-meta-properties-to-the-viewer-property-panel.html
希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.