mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
Fix UI errors getting elements using qset in IFC2X3
In IFC2X3 IfcQuantitySet didn't existed yet Mentioned in #5404
This commit is contained in:
@@ -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."""
|
"""Retrieve the elements (or element types) that are using the provided property set."""
|
||||||
is_ifc2x3 = pset.file.schema == "IFC2X3"
|
is_ifc2x3 = pset.file.schema == "IFC2X3"
|
||||||
elements = set()
|
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
|
rels = pset.PropertyDefinitionOf if is_ifc2x3 else pset.DefinesOccurrence
|
||||||
for rel in rels:
|
for rel in rels:
|
||||||
elements.update(rel.RelatedObjects)
|
elements.update(rel.RelatedObjects)
|
||||||
|
|||||||
Reference in New Issue
Block a user