duplicate_material

Materials.duplicate_material(material, new_name)[source]

Duplicate a material.

Parameters
materialstr

Name of the material.

new_namestr

Name for the copy of the material.

Returns
pyaedt.modules.Material.Material

References

>>> oDefinitionManager.AddMaterial

Examples

>>> from pyaedt import Hfss
>>> hfss = Hfss()
>>> hfss.materials.add_material("MyMaterial")
>>> hfss.materials.duplicate_material("MyMaterial", "MyMaterial2")