cancel
Showing results for 
Search instead for 
Did you mean: 

busy dialog

Valued Contributor
Valued Contributor

I have to make sure some code must be performed first,than user can interact with NX.so i need a dialog box indicate the current state,only abort button can be clicked. 

8 REPLIES

Re: busy dialog

Creator
Creator

Use the Uf call to enable abort and clear the flag status once the user interrupts

Re: busy dialog

Siemens Phenom Siemens Phenom
Siemens Phenom

In the Block Styler, on the Code Generation tab, you can add an "Enable OK/Apply Button" callback to control the sensitivity of the OK and Apply buttons.

Re: busy dialog

Valued Contributor
Valued Contributor
Thanks for reply .I agree that will work . I want to know there is something else like nxmessageBox() can do the same thing?

Re: busy dialog

Valued Contributor
Valued Contributor
Could you please make it more specific?

Re: busy dialog

Siemens Creator Siemens Creator
Siemens Creator

If I understand you situation, I had something similar and we created a dialog to handle it. 
This was coding in VB and I think it was a WINFORM dialog.  Maybe the same could be done in BLOCK STYLER.


The scenario was:

Your coding had potentially long processing to be completed.
You wanted to allow the user to ABORT this processing.


We created class with accompanying dialog (named the PROGRESS dialog).

The dialog simply had
- a line of text (which was formatted as a PROGRESS message)
- one button (in which the TEXT was altered to STOP)


The CLASS had a STOPPED flag in it that would indicate if the dialog was STOPPED or active.
This STOPPED flag was initialized to false.
It was only set to TRUE if the STOP button was selected. 


At the start of our long processing we
- initiated the PROGRESS dialog with an initial PROGRESS text

During the processing we
- queried the class for the value of the STOPPED flag.
- If STOP was true the processing was aborted
- If STOP was false then the dialog's PROGRESS text was updated

At the end of the processing the dialog was closed.

Dave Figurski

GSS / Siemens Industry Sector

Re: busy dialog

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Thanks for this detailed answer.

 

But does NX let you press the dialog stop button while processing the operations ? Sometimes, when you run an NXOpen script, you cannot click on any button until the operations are completed ...

 

Thanks.

Re: busy dialog

Siemens Creator Siemens Creator
Siemens Creator

Our situation did work because we were using WINFORM dialogs.

 

If using NX BLOCK STYLER as the dialog then you would have to test that situation. 

Dave Figurski

GSS / Siemens Industry Sector

Re: busy dialog

Valued Contributor
Valued Contributor

Thanks a lot. I‘m trying to use Swing create a busy dialog .I think that will work in Java.