|
global ptp_file_name
" o- K( u% a% a' G& a" ^' m; Oset tmp_file_name "${ptp_file_name}_"
; y0 W. b9 |% Iif {[file exists $tmp_file_name]} { MOM_remove_file $tmp_file_name } % k0 g( o0 b4 O5 O6 C( g5 `
MOM_close_output_file $ptp_file_name
2 T+ `: ?4 J$ Yfile rename $ptp_file_name $tmp_file_name . V; [5 @! M8 k/ }1 W
set ifile [open $tmp_file_name r] ) @% m2 F9 s/ i$ R# K5 M* `/ s
set ofile [open $ptp_file_name w] S6 q+ o7 g( {& A
global mom_machine_time 7 h% r. c! D8 y' W4 T/ V- w
puts $ofile "(CYCLE TIME = [format "%.2f" $mom_machine_time] MIN.)"
) X* t6 ]. o3 D( r' H6 K4 P& n$ D0 Xset buf "" while { [gets $ifile buf] > 0 } { puts $ofile $buf } ' F% k* z9 n& L, D! ]
close $ifile
' h8 { _+ H0 o+ M1 w6 U. Bclose $ofile ! }/ B1 d" \4 t* e. ]& b
MOM_remove_file $tmp_file_name 6 ^- `& o: ?5 M
MOM_open_output_file $ptp_file_name # R% r# n. z2 P2 C& u& t/ \% T) P0 ^
- C0 k% [; P2 F |
|