Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Menu Files - differences compared to ribbon files

Status
Not open for further replies.

NutAce

Mechanical
Apr 22, 2010
1,192
0
0
CH
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
 
Replies continue below

Recommended for you

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
 
Siemens? said:
(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
 
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
 
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
 
Xwheelguy said:
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...

[ol 1]
[li]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?[/li]
[li] 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[/li]
[/ol]

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

Building new PLM environment from Scratch using NX11 / TC11
 
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
 
Xwheelguy said:
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
 
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
 
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.
 
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
 
Status
Not open for further replies.
Back
Top