---------------
mom_part_name returns the whole path + part name. Needs to get just part name
Solution
The MOM varialbe mom_part_name inherently will return the whole path name and
that sometimes the user only wants to get just the actual part name. In order
to get that the user will have to write a custom command and use the 'file
tail *' command of TCL .
Basically, the format is as below :
-------- TCL command format start
file tail name
Returns all of the characters in name after the last directory separator. If
name contains no separators then returns name.
-------- TCL command format end
Below is the content of the custom command I had created and put it in the
'Start Program Sequence' event
global mom_part_name
global short_name
MOM_output_literal "$mom_part_name"
set short_name [file tail $mom_part_name]
MOM_output_literal "$short_name"
and that returns the two top lines below with the first line contains the
whole path and the 2nd line contains only the file name.
D:\d_drive_from_old_machine\downloaded_files\7514541\MAZG0002_-003.prt
MAZG0002_-003.prt
%
N0010 G40 G17 G90 G70
N0020 G91 G28 Z0.0
N0030 T47 M06
Notes and References
Hardware/Software Configuration
Platform: INTL64
OS: windows
OS Version: n/a
Product: NX
Application: CAM
Version: V10.0.3
Function: POSTBUILDER
Ref: 001-7521326