I write my own custom commands & put in the "end of program" event.
There's a fair amount of logic to consider:
1) Are you posting outside sync manager? (you may or may not want to rename)
2) Is NX posting when the sync manager is starting up? (you do NOT want to rename)
3) Is NX posting from sync manager (to get the final files)? (you DO want to rename)
4) Is post being run as part of IS&V to verify G&M code (vs internal toolpath) (probably don't wnat to rename)
The following variables are a starting point:
global mom_postprocessing_mode global mom_run_number global mom_output_file_basename global mom_sys_output_file_suffix global mom_output_file_directory global mom_output_file_full_name
I would suggest using "MOM_output_to_listing_device" to report their values for the various situations above & develop your own logic.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled