fix util.get_elements_by_pset to account for quantity sets

This commit is contained in:
myoualid
2024-09-10 17:17:42 +01:00
parent 3abe5edd21
commit 67a7e713b2
@@ -445,7 +445,7 @@ def get_elements_by_pset(pset: ifcopenshell.entity_instance) -> set[ifcopenshell
"""Retrieve the elements (or element types) that are using the provided property set."""
is_ifc2x3 = pset.file.schema == "IFC2X3"
elements = set()
if pset.is_a("IfcPropertySet"):
if pset.is_a("IfcPropertySet") or pset.is_a("IfcQuantitySet"):
rels = pset.PropertyDefinitionOf if is_ifc2x3 else pset.DefinesOccurrence
for rel in rels:
elements.update(rel.RelatedObjects)