From d5fddd5f1bede12e9128b773a1cfab3dab3f286b Mon Sep 17 00:00:00 2001 From: smr02 <67860835+smr02@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:50:56 +0200 Subject: [PATCH] https://github.com/IfcOpenShell/IfcOpenShell/issues/5511#issuecomment-2388073735 --- src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py index f2c7dd8f11..21ef97ac65 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py @@ -225,7 +225,10 @@ def serialize_shape(shape): shapes.SetFormatNb(2) shapes.Add(shape) - return shapes.WriteToString() + if hasattr(shapes, "WriteToString"): + return shapes.WriteToString() + else: + return shapes.Write() def create_shape_from_serialization(