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.
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.
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 ...
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.