generate_pset_templates - fix running after ifc4x3 release

The error was:
```
Traceback (most recent call last):
  File "\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\util\generate_pset_templates.py", line 416, in <module>
    templates_generator.parse_ifc4x3_data()
  File "\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\util\generate_pset_templates.py", line 94, in parse_ifc4x3_data
    self.parse_psets_data("IFC4X3", pset_data_glob, "IFC4X3 Property Set Templates", str(IFC4x3_OUTPUT_PATH))
  File "\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\util\generate_pset_templates.py", line 129, in parse_psets_data
    schema = ifcopenshell.ifcopenshell_wrapper.schema_by_name(schema_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\ifcopenshell_wrapper.py", line 9037, in schema_by_name
    return _ifcopenshell_wrapper.schema_by_name(arg1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: No schema named IFC4X3
```
This commit is contained in:
Andrej730
2025-03-13 18:04:33 +05:00
parent 6c04669543
commit edd60a73ca
@@ -126,7 +126,7 @@ class PsetTemplatesGenerator:
schema_name = schema_name.upper()
self.ifc_file = ifcopenshell.api.project.create_file(version=schema_name)
self.units = dict()
schema = ifcopenshell.ifcopenshell_wrapper.schema_by_name(schema_name)
schema = ifcopenshell.ifcopenshell_wrapper.schema_by_name(self.ifc_file.schema_identifier)
self.ifc_derived_unit_enum = (
schema.declaration_by_name("IfcDerivedUnitEnum").as_enumeration_type().enumeration_items()