cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

mom_variable

Genius
Genius

Is there a mom_variable that I can call to output the name of the postprocessor used to post a program.

Mike Diamond, CNC Programmer, Orizon Aerostructures Inc.


Production: NX10.0.3.5, Vericut 7.4.1, ICAM V21

Development: VB.NET, Tcl/Tk Testing: NX11
4 REPLIES

Re: mom_variable

Innovator
Innovator

mom_definition_file_name will output the name of the .def file.  This is the post name but it comes with the full path name as well as the extension.

 

To parse out just the file name:

 

global mom_definition_file_name

 

#==========================================================
# Strip path and extension from post name
#==========================================================

    set full_postname [file rootname $mom_definition_file_name]
    set post_filename [lindex [file split $full_postname] end]

 

    MOM_output_literal "(POST NAME     = $post_filename)"

 

Hope this helps.

George

 

George R. Bennett
GRB Consulting
W7 Ult
Various NX versions from 6 to 9
Dell Precision M6700

Re: mom_variable

Genius
Genius

Worked perfectly!!! Thank you very much.

Mike Diamond, CNC Programmer, Orizon Aerostructures Inc.


Production: NX10.0.3.5, Vericut 7.4.1, ICAM V21

Development: VB.NET, Tcl/Tk Testing: NX11

Re: mom_variable

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom

We also add the programmers name to the header of the program

 

MOM_output_literal "([string toupper $mom_date])"
MOM_output_literal "(UGPOST NAME: [ string toupper $postname])"
MOM_output_literal "(CREATED BY : [ string toupper $mom_logname])"

 

this does two things.  Lets the operator know who to go see with a question and lets other programmers know who last touched the program.

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX11.0.2.7, Vericut 8.0.3
Development: Tcl/Tk

Re: mom_variable

Genius
Genius

Yes. We have that in the programs already. I wasn't trying to output the post name in the program. What I was trying to accomplish, was, we have around 15-20 different postprocessors and I have created multiple custom commands to output various things such as, Part Name, Program Name, Programmer, Machine Time, and Program Travel/Smallest Machine, and because of the number of posts if any of these needed to be updated, I was having to go into each post and update separately. So, of course, I got tired of this pretty quickly, so I decided to migrate all my commands to a Source file that each post looks to. Where I got into trouble was, for all of our 3-axis machines we have one post, the rest are machine specific, and in the Program Travel/Smallest Machine command, I had two versions,one that would output the smallest machine capable of running the program based on program travel and one that was for the machine specific posts that output the only Machine it would work on and Program Travel so that operators would know if it would overtravel based on where they placed it on the table. So in order to know which Program Travel command to use I had to be able to tell the commands that if it was not being posted by the 3-axis post, to not include the smallest machine part of the command. Which ended up working perfectly with George's help.

 

Sorry that's a little long winded. lol.

Mike Diamond, CNC Programmer, Orizon Aerostructures Inc.


Production: NX10.0.3.5, Vericut 7.4.1, ICAM V21

Development: VB.NET, Tcl/Tk Testing: NX11

Learn online





Solution Information