mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Feature work schedule (#1419)
* ifcopenshell.api modules Persons and Organisations account for IFC4 SCHEMA CHANGE * New Feature to manpiulate Work Plans
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {"work_schedule": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
# TODO: do a deep purge
|
||||
if self.settings["work_schedule"].HasContext:
|
||||
rel_declares = self.settings["work_schedule"].HasContext[0]
|
||||
if len(rel_declares.RelatedDefinitions) == 1:
|
||||
self.file.remove(rel_declares)
|
||||
self.file.remove(self.settings["work_schedule"])
|
||||
Reference in New Issue
Block a user