cancel
Showing results for 
Search instead for 
Did you mean: 

Exit from NX post without completely posting my NX part file if I have at serious error.

Creator
Creator

Can I exit from NX post without completely posting my NX part file.

 

I have tried the exit command in a custom command, however this also closed my NX part file.

 

Thanks

Al

 

5 REPLIES

I am not sure I understand the question exactly.   If you...

I am not sure I understand the question exactly.

 

If you select a program or operation and postprocess interactively, then you must wait for the post to complete. When it finishes, the status of the program and operations is changed to "Complete". If the part is closed, then the status cannot be set.

 

You may be better off postprocessing in batch. Then the part is opened, the program posted, status updated, and the part is saved --  all in the background.

Mark Rief
Retired Siemens

Re: I am not sure I understand the question exactly.   If you...

Creator
Creator
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 another option.

Here is a example. I my want to stop posting based on a certain tool diameter.
Now a programmer does not get a complete program, along with a explanation of what is wrong.

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

Re: I am not sure I understand the question exactly.   If you...

It sounds like you want the MOM_abort command.
In the the help go to CAM, NX Post, TCL for the Post Writer, Procedures Added to the TCL Translator:

The special procedures that have been added by NX to the TCL interpreter for you to use in Event Handler procedures are:

Abort
Procedure Name
MOM_abort <message>

Description
This function causes MOM to write message to the syslog and then terminate by ERROR_raising().

Input
message

Example
MOM_abort "Error occurred. Postprocessing has been aborted."
Mark Rief
Retired Siemens

Re: I am not sure I understand the question exactly.   If you...

Creator
Creator
I have tried both MOM_abort & MOM_abort_event in my TCL as below, but not at the same time. They both work, I am not sure if one is better than the other. Is this what you were talking about?

MOM_abort "CHECK FOR G15 MACHINE OPTION - Posting has aborted"

MOM_abort_event "CHECK FOR G15 MACHINE OPTION - Posting has aborted event"

Re: I am not sure I understand the question exactly.   If you...

MOM_abort kills the entire posting.

MOM_abort_event jumps out of that event immediately. The rest of the event handler or custom command will also be skipped.
Mark Rief
Retired Siemens

Learn online





Solution Information