cancel
Showing results for 
Search instead for 
Did you mean: 

MENUSCRIPT: how to add new group to exsiting tab?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

We have developed in the past mutliple sets of customized commands and installed them in the Ribbon UI on a tab titled with the name of our company and a group with the name of the command set.

This works fine, when there is only ONE set of commands installed, but as soon as I install a second set, the tab with our company name gets duplicated.

 

DuplicatedTabs.png

 

Is there an option in MENUSCRIPT to add a new group to an existing tab, like it is possible in a classic menu?

4 REPLIES

Re: MENUSCRIPT: how to add new group to exsiting tab?

Esteemed Contributor
Esteemed Contributor

What kind of files do you use?

Have you read the transition guide for tool bars to ribbon?

 

I would use one RTB file and multiple GRB files.

The RTB file would already contain all the groups and they will get available when the GRB files are available.

 

Example RTB file in "%UGII_SITE_DIR%\application\profiles\All":

!
! Electrode NC Automation Ribbon Tab Definition
!

TITLE Electrode NC-Automation
VERSION 170

BUTTON  EW_NC_AUTOMATION_APPLY_ATTRIBUTES

GROUP  ew_nc_automation.grb

Example GRB file in "%UGII_SITE_DIR%\application\profiles\UG_APP_MANUFACTURING":

!
! Electrode NC Automation CAM Group Definition
!

TITLE CAM
VERSION 170

BUTTON  EW_NC_AUTOMATION_CONFIGURE

BUTTON  EW_NC_AUTOMATION_START
Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: MENUSCRIPT: how to add new group to exsiting tab?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I should have said, that each set of commands (I call it an "application") has its own setup and install path, so we have the following file structure:

+ C:\<some_path>\
|
+--+ App1
|  +-- startup
|  +-- application
|
+--+ App2
   +-- startup
   +-- application

Each application has its own menu file (*.men), toolbar file (*.tbr), and ribbon tab file (*.rtb).

My current menu file looks like this:

!File: GestCad.men

VERSION 120 EDIT UG_GATEWAY_MAIN_MENUBAR !------------------------------------------------- ! The Start Project command is always enabled !------------------------------------------------- MENU GC_MAIN_MENU BUTTON GC_START_PROJECT LABEL Start Project MESSAGE Start a new GestCAD project BITMAP MdcStartProject.bmp ACTIONS MdcStartProject.dll SEPARATOR END_OF_MENU !------------------------------------------------- ! Insert the GestCAD menu before the Help menu !------------------------------------------------- BEFORE UG_HELP CASCADE_BUTTON GC_MAIN_MENU LABEL GestCAD END_OF_BEFORE !------------------------------------------------- ! MODELING specific commands !------------------------------------------------- MODIFY APPLICATION_BUTTON UG_APP_MODELING MENU_FILES/APPEND CF_GestCAD_MDL.men END_OF_MODIFY !------------------------------------------------- ! DRAFTING specific commands !------------------------------------------------- MODIFY APPLICATION_BUTTON UG_APP_DRAFTING MENU_FILES/APPEND CF_GestCAD_DFT.men END_OF_MODIFY

And here is a part of the toolbar file:

 

! File: GestCad.tbr

TITLE GestCAD VERSION 170 BUTTON GC_START_PROJECT LABEL Start Project BITMAP MdcStartProject.bmp BUTTON GC_BASE_PLATE RIBBON_STYLE LARGE_IMAGE LABEL Create/Edit Base Plate BITMAP MdcBasePlate.bmp BUTTON GC_INSERT_OBJECT RIBBON_STYLE SMALL_IMAGE_AND_TEXT LABEL Insert Object BITMAP MdcInsertObject.bmp ! ..more lines follow here....

The problem is the ribbon tab file, which defines a new ribbon tab with the title "Cadflow". As my other application also has a ribbon tab file which defines a tab with the same name "Cadflow", NX creates a second tab and does NOT JOIN them!

 

! File: CadFlow_GestCad.rtb

TITLE Cadflow
VERSION 170

GROUP GestCad.tbr

 

What can I do, so that NX will join both tabs (with the same title) into one?

 

EDIT: I know that, if I combine both rtb files into one with the lines "GROUP App1.tbr" and "GROUP App2.tbr" I can solve the problem, but this would require a much more complex setup and uninstall script for my two "applications".

 

EDIT: Yes, I have read the latest documentation on NX10, but did NOT find anything which explains how to "edit" an existing tab and add a new group.

Re: MENUSCRIPT: how to add new group to exsiting tab?

Esteemed Contributor
Esteemed Contributor

Create one ribbon tab file that is independent from any of your applications, make sure it contains all references to any of you group files for each of your applications.

 

The groups will be displayed if they are available automatically.

 

There is no way to merge ribbon tabs at runtime, the easiest is to have a global ribbon tab file that knows all group files.

 

The example I posted creates a global custom ribbon tab displaying only one button initially.

The additional group is only displayed when the user is entering the manufacturing application.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: MENUSCRIPT: how to add new group to exsiting tab?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

This seems to be a good solution, I only have to take care that the rtb file with all groups is installed only once in a common folder and not locally in the startup folder of each app.