mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
20 lines
563 B
Python
20 lines
563 B
Python
import ifcopenshell
|
|
|
|
|
|
class Usecase:
|
|
def __init__(self, file, **settings):
|
|
self.file = file
|
|
self.settings = {"work_plan": 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_plan"],
|
|
relating_context=self.file.by_type("IfcContext")[0],
|
|
)
|
|
self.file.remove(self.settings["work_plan"])
|