cancel
Showing results for 
Search instead for 
Did you mean: 

enable/disable ribbon buttons

Pioneer
Pioneer

I have a custom ribbon which I defined in my startup folder, because it should be visible at all times. But there are buttons which do not apply to every environment or are only enabled if the customer has a license. So is it possible to enable/disable custom ribbon buttons when the user changes from assembly to model or closes all documents?

 

I also added a dll to handle all User Exits, but apart from an Exit at the beginning of File->New and File->Open (the user still can hit cancel) I do not see an exit which would be sufficient.

 

Additionally the MenuButton object does not seem to support an enable state. To toggle the state I use the ButtonSensitivity property.

 

Can someone please help?

 

Robin

 

2 REPLIES

Re: enable/disable ribbon buttons

Honored Contributor
Honored Contributor

"I have a custom ribbon which I defined in my startup folder, because it should be visible at all times. But there are buttons which do not apply to every environment or are only enabled if the customer has a license. So is it possible to enable/disable custom ribbon buttons when the user changes from assembly to model or closes all documents?"

 

Yes. You can create ribbon groups that only appear when the specified application is active. For more information, see the ribbon customization document:

 

 

https://solutions.industrysoftware.automation.siemens.com/docs/newsletter/NX-Ribbon-Customization-an...

Re: enable/disable ribbon buttons

Pioneer
Pioneer

That is working well. For the last couple of years I worked on Solid Edge customization. There you have to disable the buttons in code. That won't be that last time that I will try to do it the SE way...

 

I have yet to work on a profile specific menu. Unfortunately "reference" does not work.