From 4418c1327db5ce2e98a40dcb348798a7017da8e1 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 7 Feb 2024 11:09:49 +0500 Subject: [PATCH] MergeDuplicateTypes - fix error occuring if `ifcopenshell.api` is not imported error was: File "\site-packages\ifcpatch\__init__.py", line 78, in execute patcher.patch() File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 73, in patch self.assign_type(element, original_type) File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 114, in assign_type ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": types[0]}) ^^^^^^^^^^^^^^^^ AttributeError: module 'ifcopenshell' has no attribute 'api' --- src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py b/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py index 4b4524bd0f..f2461652b7 100644 --- a/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py +++ b/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py @@ -17,6 +17,7 @@ # along with IfcPatch. If not, see . import ifcopenshell +import ifcopenshell.api import ifcopenshell.util.element