Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX Post builder 2

Status
Not open for further replies.

Lvee

Industrial
Dec 12, 2013
6
US
I would like to stop the posting if I have a serious problem.

Can I do a command during posting of an NX file to stop the posting?

If I use the exit command, it not only stops posting, but it also exits NX as well.
I am hoping there is an other option.

if { $set_error == "99" } {
MOM_output_literal "( - check tool diameter ERROR Code $set_error - )"
exit
}

thanks
Lvee
 
Replies continue below

Recommended for you

You can use the MOM_abort command to bring up an error dialog in NX and cancel post processing:

if { $set_error == "99" } {
MOM_abort "\n\n*** check tool diameter ERROR Code $set_error ***\n\n"
}

the \n gives a blank space between the NX error output and your message and makes it clearer for the user
 
danruk
Thanks

This would work.
MOM_abort_event I think would also work.
Is there an advantage to using one over the other?

Lvee
 
No problem Lvee.

I don't beleive that MOM_abort_event would satisfy your requirement.

As I understand it MOM_abort_event can be used to abort processing of a procedure (same as the 'return' command) or of an event (like linear move, rapid move etc). This will not abort post processing as far as I am aware.

MOM_abort will abort post-processing and also allows you to enter a message as to why.

danruk
 
Use MOM_abort

It is very helpful to the end user if you add an error message that makes sense.
I will include the $mom_operation_name in the message

For example

if { $mom_update_work_offset_defined == 1 && $mom_ba_dynam_offset_xy_defined == 1 } { MOM_abort "
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
HEY!! you cannot change both dynamic and standard work offsets FIX the $mom_operation_name operation
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
" }



John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6, NX7.5 & NX8.5
Vericut7.2.3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top