Display UI from a customized button - How to?

To all

I have created a UI to be displayed to the user to enter data and then created a customized button (in NX) to call this UI.
I can link the button to the vb file but I am looking for the info to display the UI when one clinks on the customized button?
In other word were does one use the myGUI.show() call?

Thanks

Regards

JXB

What type of UI have you created? NX Blockstyler? Windows forms? Java windows? other?

In general, your journal code will launch the UI. For an example with windows forms, see:
http://nxjournaling.com/content/using-winforms-journals

The example journal in the article opens a small windows form to edit the value of an attribute. The journal launches the input window; it works the same whether the journal is started with the 'play journal' command or if it is launched from a custom button.

Thanks NXJournaling. I did have a look at the example (using-winforms-journals) to start with but I have created a NX Blockstyler UI. I am attempting to either display the UI straight away from the customized button (in NX) or failing to do this from the journal probably from the main()




Module AAA
sub Main()
myGUI.show
If DatafromUICorrect then
ProcessData()
Else
Exit Sub
End if
end sub
End Module

The UI let the user selects a xls containing inputs as well as which tab to use in this xls. The function ProcessData() will do a number of things.



Thanks



Regards



JXB

Thanks
Regards

I don't have a block styler license, so I'm a bit out of my depth on this question. However, I have to assume it works similarly to the winform example. I don't see any practical method or reason to launch the UI independent from the code that will use the input the UI collects. The "process data" code needs the data that the input block(s) provide; the easiest way to pass data back & forth is to initiate the GUI from the code that will use the input collected from the GUI.

Thanks. That's what I am concluding so far as I have not found anything on this. Thinking about it it makes sense as the button calls the vb file so the very 1st thing to do is too initiate the UI and display it. The vb file contains the following: .... how to load and display your Block UI Styler dialog in NX using APIs provided in NXOpen.BlockStyler namespace

reading further
Make sure the dlx file is in one of the following locations:
' 1.) From where NX session is launched
' 2.) $UGII_USER_DIR/application
' 3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly
' recommended. This variable is set to a full directory path to a file
' containing a list of root directories for all custom applications.
' e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_ROOT_DIR\menus\custom_dirs.dat

I created the ug_customization folder with sub-folders application\ and startup\and if I start NX from the .bat file (ug_customization folder) with the dlx file in the application folder the UI is displayed when I clik on the customized button. So a small victory here

Thanks

Regards

JXB

Thanks
Regards