Property group is not named as group
in the Forge viewer. It's called category
in this case, and can be accessed via the displayCategory
. Here is an example:
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 );
}
}
});
BTW, you can see more detail from this blog: https://forge.autodesk.com/cloud_and_mobile/2015/05/adding-custom-meta-properties-to-the-viewer-property-panel.html
Hope this help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.