Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Edit a ribbon file using menuscript?

Status
Not open for further replies.

Matt P

Automotive
Nov 6, 2023
11
Hey all, Is there a way i can use menuscript or similar to edit existing ribbon files (rtb,gly,ddl etc) in the same way that it can be used to modify exising .men files?

Documentation shows that you can use code in the below form to modify existing menu files. I would like to adapt this to modify existing ribbon tab (rtb) files.

[sub]VERSION 139

EDIT UG_GATEWAY_MAIN_MENUBAR

HIDE UG_ARRANGE

AFTER UG_FILE

CASCADE_BUTTON UG_INSERT

END_OF_AFTER
[/sub]


Currently using NX 1973
 
Replies continue below

Recommended for you

You can do it from within the NX UI (right click-customize), why would you want to do it the hard way?

But yes, Ribbons are essentially repurposed toolbars, so you can edit them in the same manner.
 

Bleaker, this is part of an improvement project I am looking to roll out for my company.
The reasoning behind using the toolbar files is that it will give administrators the ability to push out company specific buttons and applications quickly and easily while also maintaining individual users NX customizations.

Doing this with a role that is reloaded by every user is relatively cumbersome. Especially if there are users who make heavier modifications to their own role.

The purpose of modifying existing tbr files with a file to append what is in it will allow us to utilize existing NX toolbars as "out of the box" while also allowing us to have our own preferred buttons as well.

Siemens also has moved to a 6 month release cycle which will allow all NX users to more quickly get new or enhanced features which will typically be added to various "out of the box" toolbars which we will then be able to see and potentially utilize in our workflows.

sorry for the long winded reply but this is essentially the situation I am in.
 
Matt P said:
The reasoning behind using the toolbar files is that it will give administrators the ability to push out company specific buttons and applications quickly and easily while also maintaining individual users NX customizations.

Good thinking. It is more work to setup, but I think it is worth it in the long run.

www.nxjournaling.com
 
Cowski said:
Good thinking. It is more work to setup, but I think it is worth it in the long run.

I think so too. But it is absolutely more work upfront to get everything set up.
Hopefully when I am finished, the end users will be happier as well.
 
I think you can create a custom user role with the modified ribbons for that and roll it out to target users. NX doesn't like you modifying its core menus and will want to overwrite them with each update if you do.

We maintain our own menu and ribbon, and "patch it in" via the custom_dirs.dat file, this is easier than modifying NX own menus.

Anyway, both rtb and men files use the same menuscript pseudo-language, so the trick is basically to define a custom button (or get the ID of the NX own one) in the men file, and then reference it from the rtb file.

Like, this will add a group "Our Custom Stuff" to a ribbon, containing a button "Do custom stuff", which will activate the command referenced in the men file by the ID "THE_BUTTON_DEFINED_IN_THE_MEN_FILE":

BEGIN_GROUP OurCustomStuffGroup
LABEL Our Custom Stuff
BUTTON THE_BUTTON_DEFINED_IN_THE_MEN_FILE
LABEL Do custom stuff
MESSAGE Press this button to do custom stuff
BITMAP customStuff.bmp
END_GROUP
 
Bleaker, this is an option I have looked into and I'm not confident this will work the way i want it to.
I do appreciate your time and effort though. I have just found that exactly what I'm looking for is not possible currently.
I have made an ER for this so maybe i will see this sometime in a future release.

Thankyou!
 
What is it that isn't possible ?
We have created a company specific tab with our own buttons / programs / journals etc
The setup ( the files) are located in our "config library" on a common server that all NX sessions will read upon startup.
If we add a button to that , all users will have that in their next session.
We have globally three mirrored config servers serving Europe/India/China and a fourth for the USA/Canada is on the way.
In addition to that we have a common "role" that all NX installs will receive on the first start.
( the content of the "role" is copied by NX to a local file and there is no such thing as "current role")
The role adjusts the "Home tab" and some UIF settings such as hotkeys etc but it does not load the company specific tab.
that is done by placing the menufiles in our config library. - Even if you delete the local role files you will still have the company tab.
We are using the UGII_SITE_DIR and UGII_GROUP_DIR.
The content of our company tab is different depending on the active application. i.e drafting functions only visible when in drafting etc.

I can tell more on the setup if interested.
Edit : here's a picture of our modeling toolbar.

2023-11-09_17-32-01_l9h0at.png


Regards,
Tomas






The more you know about a subject, the more you know how little you know about that subject.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor