set tmp_file_name "${ptp_file_name}_"
if {[file exists $tmp_file_name]} {
MOM_remove_file $tmp_file_name
}
MOM_close_output_file $ptp_file_name
file rename $ptp_file_name $tmp_file_name
set ifile [open $tmp_file_name r]
set ofile [open $ptp_file_name w]
global mom_sys_max_travel
global mom_sys_min_travel
puts $ofile "( Max X = $mom_sys_max_travel(0) MIN X = $mom_sys_min_travel(0) )"
puts $ofile "( Max Y = $mom_sys_max_travel(1) MIN Y = $mom_sys_min_travel(1) )"
puts $ofile "( Max Z = $mom_sys_max_travel(2) MIN Z = $mom_sys_min_travel(2) )"
set buf ""
while { [gets $ifile buf] > 0 } {
puts $ofile $buf
}
close $ifile
close $ofile
MOM_remove_file $tmp_file_name
MOM_open_output_file $ptp_file_name