From 2a54fee41ab197e20aa5da393bcab108db07ca18 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 9 Jan 2021 11:59:34 +0100 Subject: [PATCH] Fix ifcopenshell.create_entity() by including schema --- src/ifcopenshell-python/ifcopenshell/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 582559230a..db5f91519b 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -63,8 +63,8 @@ def open(fn): raise IOError("Unable to open file for reading") -def create_entity(type, *args, **kwargs): - e = entity_instance(type) +def create_entity(type, *args, schema='IFC4', **kwargs): + e = entity_instance((schema, type)) attrs = list(enumerate(args)) + [(e.wrapped_data.get_argument_index(name), arg) for name, arg in kwargs.items()] for idx, arg in attrs: e[idx] = arg