create a menu display various data entries without using UI STYLER?
create a menu display various data entries without using UI STYLER?
(OP)
Hello all
I am aware that the normal way of creating a customized menu in UG is through UI Styler. That is:
1)define the frame and data entry items in the UI styler interface;
2)creating dlg/dlx file as the result;
3)modify the .men file to call the menu at startup stage; and,
4)define the callback functions associated to the created menu.
However, if one wants to do it more pragmatically, namely:
1) define a framework as a data container to hold all the data entries using UI styler;
2) save the result dlg/dlx file;
3) write nxopen-c++/nxopen-c code to add data entries(such as data property entry or toggle button) onto the data container, pragmatically. How would one do that?
I tried to find if there is a member function under (NXOpen::BlockStyler::Group)theDialog->TopBlock() like "addmenu" or "addtogglebutton", something like that to create a new data entry in real-programming-time, but there is no such functions.
Could anyone suggest what should I do please, if there any function in UF or NXOpen can achieve that? I think there must be some underline coding behind all these manual dialog and menu-item creating operations, right?
Many thanks!
Gan
I am aware that the normal way of creating a customized menu in UG is through UI Styler. That is:
1)define the frame and data entry items in the UI styler interface;
2)creating dlg/dlx file as the result;
3)modify the .men file to call the menu at startup stage; and,
4)define the callback functions associated to the created menu.
However, if one wants to do it more pragmatically, namely:
1) define a framework as a data container to hold all the data entries using UI styler;
2) save the result dlg/dlx file;
3) write nxopen-c++/nxopen-c code to add data entries(such as data property entry or toggle button) onto the data container, pragmatically. How would one do that?
I tried to find if there is a member function under (NXOpen::BlockStyler::Group)theDialog->TopBlock() like "addmenu" or "addtogglebutton", something like that to create a new data entry in real-programming-time, but there is no such functions.
Could anyone suggest what should I do please, if there any function in UF or NXOpen can achieve that? I think there must be some underline coding behind all these manual dialog and menu-item creating operations, right?
Many thanks!
Gan





RE: create a menu display various data entries without using UI STYLER?
As for C/C++/C#/VB/Java I think you're out of luck. Instead you have to create your own custom dialog from scratch. Depending on the language this might be WinForms or something else.
We mainly develop in Java and when building a dialog at runtime was necessary we've done a couple of projects like this using SWT, Swing or JavaFX.
Graham Inchley, Systems Developer, Sandvik Coromant. www.sandvik.com
HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
RE: create a menu display various data entries without using UI STYLER?
Thanks for the reply.
So I guess the answer is NO then? I was hoping that UG Open must have developed some APIs to interface with these menu-display widgets.
I will wait a bit longer to see if anyone else can offer some suggestion. Otherwise, I have to find the alternatives.
Thank you!
RE: create a menu display various data entries without using UI STYLER?
I know this is really crappy and relies on having prior knowledge of what might be required in the future, but thats how it is.
Like you I would REALLY like it if we could dynamically add controls to a BlockDialog, it would save a ton of work writing a whole custom dialog, but right now its not possible.
Graham Inchley, Systems Developer, Sandvik Coromant. www.sandvik.com
HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
RE: create a menu display various data entries without using UI STYLER?
Many thanks!
Gan