From 4dbfeefe53fc9488ddf2e56e29722813d3ec39ec Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 18 Sep 2024 16:18:15 +0500 Subject: [PATCH] Fix UI errors getting elements using qset in IFC2X3 In IFC2X3 IfcQuantitySet didn't existed yet Mentioned in #5404 --- src/ifcopenshell-python/ifcopenshell/util/element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index 99fce25b21..e59d2377da 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -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") or pset.is_a("IfcQuantitySet"): + if pset.is_a("IfcPropertySet") or pset.is_a("IfcElementQuantity"): rels = pset.PropertyDefinitionOf if is_ifc2x3 else pset.DefinesOccurrence for rel in rels: elements.update(rel.RelatedObjects)