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

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

18 lines
512 B
Python
Raw Normal View History

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