-
I am working on a script to assign parent GroupIDs to various IFC entities within an IFC4 file. I have made progress in assigning GroupIDs to the "IfcProject" subclass. However, I'm encountering difficulties when trying to obtain the parent GUIDs for "IfcSpatialElement" entities. Here's a simplified version of my current code: def build_ifc_relationship_map(ifc_file): Thank you in advance for your assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
for element in ifc_file.by_type("IfcSpatialElement"):
parent = ifcopenshell.util.element.get_aggregate(element)
print(parent.GlobalId) |
Beta Was this translation helpful? Give feedback.
Do you mean you want to know the GlobalId of the spatial element that an object (e.g. a wall/ window) is in?