Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py
T

15 lines
432 B
Python

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