From 4e39fb3edd78d63b4285f8d17bd19d9a137c893f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 15 May 2024 16:03:51 +0500 Subject: [PATCH] fix issue adding layers (name is not optional in ifc) --- src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py index df171a4ded..d3a6c162c8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py @@ -43,4 +43,4 @@ def add_layer(file: ifcopenshell.file, Name: Optional[str] = None) -> ifcopenshe ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL-FULL-DIMS-N") """ - return file.create_entity("IfcPresentationLayerAssignment", Name=Name) + return file.create_entity("IfcPresentationLayerAssignment", Name=Name or "Unnamed")