Problem with NX Custom Menus
Problem with NX Custom Menus
(OP)
Hi everyone,
I've been searching in this forum and I didn't found solution to my problem. Some guy who no longer works for my company did a customization for NX4. Now I'm trying to update/improve that customization for NX7.5 adding new shortcuts.
The problem is that I don't know why I am unable to make calls to NX commands from my custom menu. I put some easy/dumb code to see if you can help me make it work. Once I get this to work I will do the real customization.
Variable UGII_SITE_DIR is set properly
The thing is, toolbar is loaded and both buttons also loaded and working.
The menu is also loaded but only the print custom button appears.
Why doesn't the New file button appear? What am I doing wrong? I can always replace it with a macro, but I don't see it "clean".
To create the menus applying a role is not a option here.
Can you help me?
Thanks a lot!
I've been searching in this forum and I didn't found solution to my problem. Some guy who no longer works for my company did a customization for NX4. Now I'm trying to update/improve that customization for NX7.5 adding new shortcuts.
The problem is that I don't know why I am unable to make calls to NX commands from my custom menu. I put some easy/dumb code to see if you can help me make it work. Once I get this to work I will do the real customization.
Variable UGII_SITE_DIR is set properly
CODE --> File@startup\toolbar.tbr
TITLE MY_TOOLBAR VERSION 120 BUTTON PRINT_PDF LABEL Print PDF file BITMAP print ACTIONS U:\Journal\print_pdf.vb BUTTON UG_FILE_NEW
CODE --> File@startup\menus.men
VERSION 120
EDIT UG_GATEWAY_MAIN_MENUBAR
MODIFY
APPLICATION_BUTTON UG_APP_MODELING
MENU_FILES menu_modeling.men
END_OF_MODIFY CODE --> File@application\menu_modeling.men
VERSION 120 EDIT UG_GATEWAY_MAIN_MENUBAR BEFORE UG_HELP CASCADE_BUTTON Custom_modelling LABEL Custom Shortcuts END_OF_BEFORE MENU Custom_modelling BUTTON UG_FILE_NEW ACTIONS STANDARD BUTTON PRINT_PDF LABEL Print PDF file BITMAP print ACCELERATOR Ctrl+P ACTIONS U:\Journal\print_pdf.vb END_OF_MENU
The menu is also loaded but only the print custom button appears.
Why doesn't the New file button appear? What am I doing wrong? I can always replace it with a macro, but I don't see it "clean".
To create the menus applying a role is not a option here.
Can you help me?
Thanks a lot!





RE: Problem with NX Custom Menus
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Problem with NX Custom Menus
It works, but I just see one problem there: this will load the 'menu_modeling.men' always and keep it at all apps, not only on the modeling app. I plan to have different menus for drafting, modeling...
I can create those menus hidden and show them only when I want. Code of a new 'menus.men' will be like this or is it too twisted?
EDIT UG_GATEWAY_MAIN_MENUBAR
MODIFY
APPLICATION_BUTTON UG_APP_MODELING
MENU_FILES show_modeling.men
END_OF_MODIFY
and in another file in application
EDIT UG_GATEWAY_MAIN_MENUBAR
SHOW custom_modeling