From 61af868c7a00195569c5e5d2efa8d1d1a9c36164 Mon Sep 17 00:00:00 2001 From: Vukas Pajic Date: Wed, 13 Mar 2024 09:23:52 +0100 Subject: [PATCH] sync with latest --- src/ifc4d/ifc4d/msp2ifc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ifc4d/ifc4d/msp2ifc.py b/src/ifc4d/ifc4d/msp2ifc.py index a133420cb3..face82e7e9 100644 --- a/src/ifc4d/ifc4d/msp2ifc.py +++ b/src/ifc4d/ifc4d/msp2ifc.py @@ -208,7 +208,7 @@ class MSP2Ifc: def create_boilerplate_ifc(self): self.file = ifcopenshell.file(schema="IFC4") - self.file.create_entity("IfcProject", Name=self.project["Name"]) + ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject") self.work_plan = self.file.create_entity("IfcWorkPlan") def create_tasks(self, work_schedule): @@ -230,7 +230,6 @@ class MSP2Ifc: for calendar in self.calendars.values(): if not has_work_or_exceptions(calendar): continue - ifcopenshell.api.run("context.add_context", self.file, context_type="Model") calendar["ifc"] = ifcopenshell.api.run("sequence.add_work_calendar", self.file, name=calendar["Name"]) self.process_working_week(calendar["StandardWorkWeek"], calendar["ifc"]) self.process_exceptions(calendar["HolidayOrExceptions"], calendar["ifc"])