omf_io.utils.file.write_omf_element
- omf_io.utils.file.write_omf_element(element, output_file, overwrite=False)[source]
Write an OMF element to a file, handling new or existing files.
- Parameters:
element (omf.base.ProjectElement) – The OMF element to write.
output_file (Path) – The file path to save the OMF element.
overwrite (bool) – Whether to overwrite the file if it exists.
- Raises:
FileExistsError – If the file exists and overwrite is False.