mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix ifcopenshell.create_entity() by including schema
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user