Hello,
I am trying to read the value also of hidden elements in my BIM360 app - but to no avail.
This is my code snippet that supposed to do that, but only the visible properties are printed:
for (const dbid of dbids) {
model.getProperties(dbid, (result) => {
if (
result &&
result.properties &&
result.name.startsWith("BE_Sphere_")
) {
console.log(`Properties of dbid ${dbid}:`, result);
} else {
console.log(`No properties found for dbid ${dbid}.`);
}
});
console.log(`Fetching hidden properties for dbid ${dbid}`);
model.getProperties(dbid, (hiddenResult) => {
if (hiddenResult && hiddenResult.properties) {
hiddenResult.properties.forEach((hiddenProp) => {
console.log(`Hidden - ${hiddenProp.displayName}: ${hiddenProp.displayValue}`);
});
}
}, (error) => {
console.error('Error fetching hidden properties:', error);
}, { includeHidden: true });
}
Someone has an idea why is that?
Thank you!