[英]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.