Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
553 B
Python
Raw Normal View History

2021-04-07 00:31:16 +01:00
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
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["work_schedule"],
relating_context=self.file.by_type("IfcContext")[0],
)
2021-04-07 00:31:16 +01:00
self.file.remove(self.settings["work_schedule"])