×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problem with NX Custom Menus

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

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 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!

RE: Problem with NX Custom Menus

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.

RE: Problem with NX Custom Menus

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources