Skip to content

Need Assistance in Retrieving Parent GUIDs for IfcSpatialElement Entities in IFC4 File Parsing Script #3618

Answered by Moult
ashi7upt asked this question in Q&A
Discussion options

You must be logged in to vote

Do you mean you want to know the GlobalId of the spatial element that an object (e.g. a wall/ window) is in?

for element in ifc_file.by_type("IfcWall"):
    parent = ifcopenshell.util.element.get_container(element)
    print(parent.GlobalId)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ashi7upt
Comment options

@Moult
Comment options

Answer selected by Moult
@ashi7upt
Comment options

@Moult
Comment options

@ashi7upt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants