import_materials_from_workbench#

Materials.import_materials_from_workbench(input_file: str, name_suffix: str = None) list[Material] | bool#

Import and create materials from Workbench Engineering Data XML file.

Parameters:
input_filestr

Full path and name for the XML file.

name_suffixstr, None, optional

String containing the suffix to be applied to the imported material names. The default is None, in which case “_wb” is used. Set it to "" to maintain in AEDT the same name as in Workbench.

Returns:
List of ansys.aedt.core.modules.material.Material

Examples

>>> from ansys.aedt.core.modules.material_lib import Materials
>>> obj = Materials()
>>> obj.import_materials_from_workbench(input_file="example.txt")