Usecases to edit WorkCalendar Attributes in the ifcopenshell.api

This commit is contained in:
bosonprojets
2021-04-29 02:43:14 +00:00
parent b726ba7816
commit f8eb1c178a
7 changed files with 84 additions and 6 deletions
@@ -13,9 +13,14 @@ class Usecase:
if name == "TimePeriods" and value:
periods = []
for period in value:
periods.append(self.file.create_entity("IfcTimePeriod", **{
"StartTime": ifcopenshell.util.date.datetime2ifc(period[0]),
"EndTime": ifcopenshell.util.date.datetime2ifc(period[1])
}))
periods.append(
self.file.create_entity(
"IfcTimePeriod",
**{
"StartTime": ifcopenshell.util.date.datetime2ifc(period[0]),
"EndTime": ifcopenshell.util.date.datetime2ifc(period[1]),
},
)
)
value = periods
setattr(self.settings["recurrence_pattern"], name, value)