Missing properties (Globalds) from IFC file in viewer

603 Views Asked by At

To resume the steps leading to my issue:

  1. Upload a file to bucket in Forge.
  2. Convert the file.
  3. Extract the IFC data using external tool.

Now I am trying to get (using the Viewer) the GlobalIds of each element, as in IFC they are unique and match them to the data that I already have by this property.

Currently in the converted file that is shown in the viewer, not all the elements from the geometry are providing the correct data on click. For example: If I open a IFC file in viewer and I click on the Roof element, it does not select the IfcRoof element, but some IfcElement that is lower in the structure and that neither have a GlobalId, nor has some data attached, cause it is not supposed to. So now it is not possible to get the proper properties of the element using the viewer because it does not selects the right element, which I need to match the data that I extract with the external tool.

Any ideas how I can proceed with that?

2

There are 2 best solutions below

4
On BEST ANSWER

Can you simply traverse the structure from the lower level element upwards until you reach an element that does provide a valid global id?

1
On

So the clue is that you should iterate the response's __parent's till you get an element with type 'IFC' and get his GlobalId. It works in most cases.