Showing results for 
Search instead for 
Did you mean: 

Stop Box to abort code execution


Hi all,


Problem description:

Within an application based on Block UI Styler and C++, the user starts some automatized operations via click on "OK".

Based on the size of the CAD model, the automatized operations can take a long time.


I would like to display the NX "Stop"-Box, like it is for example displayed during Meshing in the Advanced Simulation environment, to enable the user to abort code execution when he likes to.


Are there any Suggestions?

Unfortunately I was not able to find any API for that...


Best regards,



Re: Stop Box to abort code execution

Siemens Phenom Siemens Phenom
Siemens Phenom


There are four functions available that have some effect on this.  Full details are available in the Open C Reference, in the uf_abort chapter.  These are also wrapped for use in NXOpen.Net.


However, none of them really gives you complete control over this.  If you enable abort using one of these calls, then NX is free to post the work-in-progress dialog when it wants to.  Note that there is no way to force it to post this dialog.


Then you can have a check in your code to ask for the flag status, to see if the user tried to abort.  It is up to you to provide any cleanup routines or undo to a suitable state  when this happens.  But to be clear, the dialog may or may not appear when abort is enabled.

Re: Stop Box to abort code execution


Hi Steve,


thank you for your hint, sounds like exactly what I need.


I will try it out as soon as possible.

Re: Stop Box to abort code execution


is there an equivalent to the pop up method in C#?


depensing on your code and operations beign carried out, if place at "key" positions the popup might allows the user to stop the operation

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)