ansys.materials.manager.util.matml.matml_from_material#

Provides the MatmlWriter class.

Module Contents#

Classes#

MatmlWriter

Exports a list of MAPDL materials to an engineering data XML file.

Attributes#

ROOT_ELEMENT

VERSION

VERSION_DATE

ansys.materials.manager.util.matml.matml_from_material.ROOT_ELEMENT = 'EngineeringData'#
ansys.materials.manager.util.matml.matml_from_material.VERSION = '18.0.0.60'#
ansys.materials.manager.util.matml.matml_from_material.VERSION_DATE = '29.08.2016 15:02:00'#
class ansys.materials.manager.util.matml.matml_from_material.MatmlWriter(materials: Sequence[ansys.materials.manager.material.Material])#

Exports a list of MAPDL materials to an engineering data XML file.

> writer = MatmlWriter(materials) > writer.export(‘engineering_data.xml’)

Construct a Matml writer.

write(buffer: BinaryIO, **kwargs) None#

Write a Matml (engineering data xml format) representation of materials to buffer.

Parameters:
buffer:

buffer to write to

**kwargsbool, optional

Optional keyword arguments. indent : bool, optional

Whether to add an indent to format the XML output(python 3.9+). Defaults to false.

xml_declaration: bool, optional

Whether to add the XML declaration to the output

export(path: _PATH_TYPE, **kwargs) None#

Write a Matml (engineering data xml format) representation of materials to file.

Parameters:
path:

File path

**kwargsbool, optional

Optional keyword arguments. indent : bool, optional

Whether to add an indent to format the XML output(python 3.9+). Defaults to false.

xml_declaration: bool, optional

Whether to add the XML declaration to the output