Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/document/remove_document.py
T

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

13 lines
429 B
Python
Raw Normal View History

class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"document": None}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
self.file.remove(self.settings["document"])
for rel in self.file.by_type("IfcRelAssociatesDocument"):
if not rel.RelatingDocument:
self.file.remove(rel)