MMpy.File.create_from_template

Syntax

MMpy.File.create_from_template(output_file_path, output_file_title, file_structure_object)

Description

Create a file by using an existing file structure as the template.

Parameters

Name
Type
Description

output_file_path 

str The path of the output data file.

output_file_title 

str The title written to the header of the output data file.

file_structure_object 

MMpy.FileStruct The template structure to create the new data file from.

Returns

Type
Description
bool Returns True if successful, False otherwise.

See Also

MMpy.File.copy

Notes

This is a static class method.

Examples

file = MMpy.File()
file.open(...)

structure = file.structure

output_file_path = MMpy.Project.path() + 'OutFile.DAT'
output_file_title = 'OutFileTitle'
MMpy.create_from_template(output_file_path, output_file_title, structure)

Resource ID

IDPH_FILE_FROM_TEMPLATE