pm4py.write.write_ptml#
- pm4py.write.write_ptml(tree: ProcessTree, file_path: str, auto_layout: bool = True, encoding: str = 'utf-8') None [source]#
Writes a process tree object to disk in the
.ptml
format.- Parameters:
tree (
ProcessTree
) – ProcessTree object that needs to be written to disk.file_path (
str
) – Target file path on disk of the.ptml
file.auto_layout (
bool
) – Boolean indicating whether the model should get an auto layout (which is written to disk).encoding (
str
) – The encoding to be used (default: utf-8).
import pm4py pm4py.write_ptml(tree, '<path_to_export_to>', auto_layout=True)