ifcopenshell.api.classification.remove_reference#

Module Contents#

class ifcopenshell.api.classification.remove_reference.Usecase(file, reference=None, product=None)#

Removes a classification reference from a product

If the classification reference is no longer associated to any products, the classification reference itself is also removed.

Parameters
Returns

None

Return type

None

Example:

wall_type = model.by_type("IfcWallType")[0]
classification = ifcopenshell.api.run("classification.add_classification",
    model, classification="MyCustomClassification")
reference = ifcopenshell.api.run("classification.add_reference", model,
    product=wall_type, classification=classification,
    identification="W_01", name="Interior Walls")
ifcopenshell.api.run("classification.remove_reference", model,
    reference=reference, product=wall_type)
execute(self)#