Fetch hidden properties of an element

mizrachi_amir
Participant
Participant

Fetch hidden properties of an element

mizrachi_amir
Participant
Participant

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!

0 Likes
Reply
253 Views
1 Reply
Reply (1)

ronekvokes
Community Visitor
Community Visitor

I'm stripping a copy of a dom down to just mainly text so I can send it to a server. It's for an android application, otherwise I would be using jquery and not having so much trouble.

0 Likes