Fix ifcopenshell.create_entity() by including schema

This commit is contained in:
Thomas Krijnen
2021-01-09 11:59:34 +01:00
parent 3d0c9378c1
commit 2a54fee41a
@@ -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