ifcopenshell.api.material.remove_material

Module Contents

ifcopenshell.api.material.remove_material.remove_material(file: ifcopenshell.file, material: ifcopenshell.entity_instance) None

Removes a material

If the material is used in a material set, the corresponding layer, profile, or constituent is also removed. Note that this may result in a material set with zero items in it, which is invalid, so the user must take care of this situation themselves.

Parameters:

material (ifcopenshell.entity_instance) – The IfcMaterial entity you want to remove

Returns:

None

Return type:

None

Example:

# Create a material
aluminium = ifcopenshell.api.material.add_material(model, name="AL01", category="aluminium")

# ... and remove it
ifcopenshell.api.material.remove_material(model, material=aluminium)