ifcopenshell.api.material.copy_material#

Module Contents#

class ifcopenshell.api.material.copy_material.Usecase(file, material=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.entity_instance) – The IfcMaterial to copy

Returns

The new copy of the material

Return type

ifcopenshell.entity_instance.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)
execute(self)#