Cancel
Showing results for 
Search instead for 
Did you mean: 

How to output only Part name in NX cam postprocessing without having the complete path?

Pioneer
Pioneer

I want to output the name of my part on which i have created operations.

I am currently using the variable mom_part_name, but the output consists of complete path details too.

 

I just want to out the part name.

 

Kindly help.

Thanks

5 REPLIES

Re: How to output only Part name in NX cam postprocessing without having the complete path?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Try mom_base_name I dont remember exact name, see Mom Variables

Re: How to output only Part name in NX cam postprocessing without having the complete path?

Pioneer
Pioneer

Hi 

 

One way to do i found is :

 

set x [string file tail $mom_part_name]

MOM_output_literal "$x"

 

It will output only the final part name after the last separator.

 

Thanks

Re: How to output only Part name in NX cam postprocessing without having the complete path?

Legend
Legend

If $mom_part_name return a full path

set filename [file tail $mom_part_name]

Return filename with extension

If you want without extension :

set filename_without_extension [file tail [file rootname $mom_part_name]]

Hope que ça helps

@mkn
Production: NX11.0.2.7,VERICUT 7.3.3
Development: Tcl/Tk, Gnuplot
www.deshors-tiremold.com

Re: How to output only Part name in NX cam postprocessing without having the complete path?

Legend
Legend
And [string file tail ...] is not a tcl command !!
@mkn
Production: NX11.0.2.7,VERICUT 7.3.3
Development: Tcl/Tk, Gnuplot
www.deshors-tiremold.com

Re: How to output only Part name in NX cam postprocessing without having the complete path?

Pioneer
Pioneer

Hi

Thanks for the insight you gave.

 

Its really helpful.

I am gonna try it to output.

 

 

Learn online





Solution Information