Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/context/remove_context.py
T

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

13 lines
437 B
Python
Raw Normal View History

class Usecase:
def __init__(self, file, settings=None):
self.file = file
self.settings = {"context": None}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
# TODO: this is a light remove only
for subcontext in self.settings["context"].HasSubContexts:
self.file.remove(subcontext)
self.file.remove(self.settings["context"])