I'm currently updating an old GRIP program (from GRIP to blockstyler and VB code); to mimic the flow of the GRIP program, I'd like to use a blockstyler form for some input then use the Ui.PointSubfunction to allow the user to enter one or more points. However, the Ui.PointSubfunction returns an "unable to bring up dialog" error. I assume the blockstyler dialog is interfering in some way; is there a way to use the PointSubfunction after the user presses OK on the blockstyler form?
Solved! Go to Solution.
I do not think you can launch a dialog of any kind from the OK button. It is really intended to just finalize all of your changes and then dismiss the dialog.
Related issue - some kinds of dialogs cannot be launched from many of the controls on a Block Styler dialog, but often they CAN be lauched from an Action Button. I don't know about that specific button without testing.
It sounds as if the thing you are running is the dialog, and the dialog runs the code.
If you re-architect a bit, and have the VB program the "master"
VB program then creates & runs the dialog
After user hits "OK" in the dialog, control returns to the VB program, at which point you *should* be able to pop up other dialogs.
Production: NX10.0.3.5 MP5 + patch/TC11.2
Apparently I've turned into a gearhead
I often use a separate thread that checks if the form is closed.
frmMain.Show() 'start separate thread. Dim checkThread As New Thread(New ThreadStart(AddressOf IsFormDismissed)) checkThread.Start() End Sub Sub IsFormDismissed() Do If frmMain.IsDisposed = True Then UnloadNXLibrary() End If Thread.Sleep(500) Loop End Sub Sub UnloadNXLibrary() 'get running DLL Dim runningProgram As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly ufs.UF.UnloadLibrary(runningProgram.Location) End Sub
Why do you want to make things unnecessarily complex?
The block styler also offers a point selector, you can even display a selection list, which is mostly standard by now.
Create a block dialog that allows collection of every necessary information and on OK process the information.
GRIP didn't offer a complete dialog for all, so you had to select everything in separate dialogs, since by the time GRIP was introduced the UI was very limited.
Now with the block dialogs, we no longer need hundreds of dialogs, we just need one.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
Thanks for the confirmation.
Thanks, looks like I can get it to work with your suggestion.
Thanks for the sample code. Not quite what I needed this time, but I'm going to tuck it away for future reference.
I won't bore you with the details, but the end user's desired workflow doesn't fit perfectly into the single NX dialog model. I have a prototype up and running with a Winform and I wanted to see if I could duplicate its functionality with the blockstyler.