ifcopenshell.api.material.copy_material

Module Contents

ifcopenshell.api.material.copy_material.copy_material(file, material=None) None

Copies a material

All material psets and styles are copied. The copied material is not associated to any elements.

Parameters:

material (ifcopenshell.entity_instance) – The IfcMaterial to copy

Returns:

The new copy of the material

Return type:

ifcopenshell.entity_instance

Example:

concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")

# Let's duplicate the concrete material
concrete_copy = ifcopenshell.api.run("material.copy_material", model, material=concrete)