From d55e7faf2a8d72f7d26fe36359e834a5583d2a1c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 15 Jul 2025 18:01:12 +0500 Subject: [PATCH] Fix ifc4x3 breaking import of csvs that have enum values after c9847ca #6708 --- src/ifcopenshell-python/ifcopenshell/util/pset.py | 3 +++ src/ifcopenshell-python/ifcopenshell/util/selector.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/pset.py b/src/ifcopenshell-python/ifcopenshell/util/pset.py index ac8cec997b..da08e9b4fe 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/pset.py +++ b/src/ifcopenshell-python/ifcopenshell/util/pset.py @@ -30,6 +30,9 @@ templates: dict[str, "PsetQto"] = {} def get_template(schema: str) -> "PsetQto": + """ + :param schema: As in ``file.schema_identifier``, not ``file.schema``. + """ global templates if schema not in templates: templates[schema] = PsetQto(schema) diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py index 100cd70403..aa6789865f 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/selector.py +++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py @@ -689,7 +689,7 @@ def set_element_value( if len(enum_values) == len(current_value) and set(enum_values) == set(current_value): return ... - template = ifcopenshell.util.pset.get_template(ifc_file.schema) + template = ifcopenshell.util.pset.get_template(ifc_file.schema_identifier) pset_template = template.get_by_name(pset.Name) if pset_template is None: return value