×
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

Menu Files - differences compared to ribbon files

Menu Files - differences compared to ribbon files

Menu Files - differences compared to ribbon files

(OP)
Hello All,

I tried creating some menu files for NX9 but ran into problems.

1 - Starting a dll with arguments.
in an earlier posting I asked a question on how to start a dll with arguments from the ribbon. Below solution was working for the ribbon tabs.

BUTTON Illustrator_CGM
LABEL Illustrator CGM Export
MESSAGE Export CGM for Adobe Illustrator
BITMAP $SITE_PREF_PATH\ForEngineDocsCGM\Startup\Plotcgm4Illustrator.bmp
ACTION $SITE_PREF_PATH\ForEngineDocsCGM\ForEngineDocs_Plotcgm.dll("Ai")

This is however not working for a menu (.men) file... ACTION is not recognized but needs to be ACTIONS for some reason.
And also when changed to ACTIONS apperently the argument ("Ai") is also not recognized


2 - Showing menus depending on application
When I place the Ribbon files in the Applications Profiles directory the ribbons will only appear with the application they are created for.
e.g toolbars in UG_APP_DRAFTING directory will only show in drafting and not in modeling.

How can I accomplish the same with menu files? Placing them in the application folder doesn't work. As far as I have experienced the menu files will only work when placed in the site Startup folder or any folder defined in Custom-dirs.dat

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

RE: Menu Files - differences compared to ribbon files

Here is what the NX9 docs state:

If you modify a standard NX toolbar or menu (for example, the Assemblies toolbar), and you want the modified version to appear when the appropriate application is opened, you should place your customized file in the application directory. If you have a new toolbar or menu, you should place it in the startup directory, so it will load in addition to other startup items when NX starts up. (New toolbars and menus in the application directory are ignored.)

So, with that being said, if you're modifying an existing NX pulldown or toolbar, put your files in an application directory at the bottom of the tree of whatever your custom_dirs.dat file defines. If you're adding a pulldown or toolbar, put them in startup.

We use the GM Toolkit and it adds a bunch of commands with a new menu pulldown as well as a Tab (maybe more than 1 Tab, can't recall off hand). All of the .men, .rtb & .tbr files reside in a Startup folder as defined in custom_dirs.dat. I believe .tbr files are a thing of the past, but I could be wrong - cannot recall since I just went with interactive interface customization & use a Role to restore my interface during startup.

If that doesn't work I'd call GTAC.

Tim Flater
NX Designer
NX 9.0.2.5 Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M

RE: Menu Files - differences compared to ribbon files

(OP)

Quote (Siemens?)

(New toolbars and menus in the application directory are ignored.)

That is not completely true...I have created new ribbons, placed them in the application folder and they work fine, and show only in the dedicated application.

But this is beside the question...I would like the same behavior for the menu files...and there (indeed) it doesn't work.

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

RE: Menu Files - differences compared to ribbon files

Ronald,

Re-read my post above - I edited it.

Going by the GM Toolkit - this is an instance where they've created NEW menu & ribbon tabs. They are ALL placed in the Startup folder. That works, as we get the menu pulldown regardless of application. I would also double check that the Startup or Application folder name has the first letter capitalized.

I am not saying that the docs are correct - I'm just giving you that info as well as giving an example that DOES work day in & day out with the GM Toolkit. If it doesn't work and you're SURE you're doing it right, then call GTAC. I have only the information you've provided & I have no clue if you're using .rtb files, how your custom_dirs.dat file is set up, etc. As you previously experienced, a SINGLE mistake in any of that causes the whole customization to not work correctly.

Tim Flater
NX Designer
NX 9.0.2.5 Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M

RE: Menu Files - differences compared to ribbon files

Are you making new rtb/tbr & men files or are you editing the out of the box files?

Tim Flater
NX Designer
NX 9.0.2.5 Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M

RE: Menu Files - differences compared to ribbon files

(OP)

Quote (Xwheelguy)

Are you making new rtb/tbr & men files or are you editing the out of the box files?

New RTB's and Men files. The contents setup is copied from existing ones...

Two things are not according to what I would like...

  1. The procedure of calling a dll with arguments ("Ai") is only working in rtb's not in men files.
    What would be the correct way of stating an argument inside a men file?
  2. Apperently it is not possible to activate a men file only in the application it is ment for...
    I did see however this statement in one men file but that is not doing what I think it should.
    MODIFY

    APPLICATION_BUTTON UG_APP_DRAFTING
    MENU_FILES/APPEND Documentation.men

    END_OF_MODIFY

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

RE: Menu Files - differences compared to ribbon files

OK, Ronald - do you have a GTAC webkey account or access to the NX11 docs? If yes to either, please refer to the docs, then select Programming Tools -> Menuscript User's Guide and browse the top 2 categories in the upper left. I'm afraid the menu customization is more complicated than I imagined and it's even more complicated with custom ribbons in specific applications - there are quite a few files that must be created other than .rtb files. I would suggest you refer to those areas, as you're going into areas beyond my experience. Based on your initial question, I thought I could help but after reading some of the docs, it's more involved than I imagined - I apologize for that. The NX9 docs have nothing like the NX11 docs related to the ribbon customization you're doing.

As far as the arguments, I've never come across anything in the docs that state they are supported, but that's mainly up to NX9 - obviously the NX11 docs are a bit more detailed with the ribbon interface and you might find something in there. If you don't find any info on it, call GTAC if you can.

Again, sorry I could not help more.

Tim Flater
NX Designer
NX 9.0.2.5 Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M

RE: Menu Files - differences compared to ribbon files

(OP)

Quote (Xwheelguy)

Again, sorry I could not help more.

No Problem :) at least you are thinking about it...and giving some good pointers...I will have a look at the NX11 docs.
The oficial document (NX Ribbon - Customization and Transition) from NX9 unfortunatley only shows the improvements, not the whole setup...

Anyhow...thanks a lot for your help!

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

RE: Menu Files - differences compared to ribbon files

I don't know if it offers any help or not,
-I assume that you have seen this guide ?

https://download.industrysoftware.automation.sieme...

I am in the process of attempting to add a few buttons to start Journals, to the Home tab, for a specific group only.


Regards,
Tomas

RE: Menu Files - differences compared to ribbon files

(OP)
Hi Tomas,

Yeah, already have that... Didn't help :)

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

RE: Menu Files - differences compared to ribbon files

Ronald,

1. When menu files call a dll, they pass the button name as the first argument, while the ribbon/toolbar files only pass the arguments in parenthesis. The equivalent in the ribbon file would be ForEngineDocs_Plotcgm.dll("Illustrator_CGM","Ai").
2. In a startup directory under a directory listed in your custom_dirs.dat, create a menu file that contains something like this:
VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY

APPLICATION_BUTTON UG_APP_DRAFTING
MENU_FILES Documentation.men

END_OF_MODIFY
Then place your Documentation.men file in an application directory under a directory listed in custom_dirs.dat

Assuming that Documentation.men is defined correctly, the menu should only be available in drafting.

RE: Menu Files - differences compared to ribbon files

(OP)
Thanks cpttrips...I will try first thing tomorrow...

#offtopic All exited about the Dark Tower movie?

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11

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