Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with NX Custom Menus

Status
Not open for further replies.

larri86

Automotive
Dec 11, 2012
3
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
Code:
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:
VERSION 120
EDIT UG_GATEWAY_MAIN_MENUBAR
MODIFY
  APPLICATION_BUTTON UG_APP_MODELING
     MENU_FILES menu_modeling.men
END_OF_MODIFY
Code:
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 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!
 
Replies continue below

Recommended for you

Put the 'menu_modeling.men' file in the 'Startup' folder instead of the 'Application' folder.

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.
 
Thank you John!
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor