Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ribbon icon grayed out

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
patrick.emin
667 Views, 2 Replies

Ribbon icon grayed out

Is it possible to have a custom grayed out icon in the ribbon when this icon has been used at least once? For example, the user clicks on this icon and it becomes gray to notify the user it has been used. The purpose is to load certain DLL with Netload only once.


Patrick Emin animateur de la communauté francophone


Vous avez trouvé un message utile? Alors donnez un "J'aime" à ce message!
Votre question a eu une réponse satisfaisante? Voulez vous avoir l'amabilité de cliquer sur le bouton
 APPROUVER LA SOLUTION  en bas de la réponse qui apporte une solution?
Signez notre Livre d'Or
2 REPLIES 2
Message 2 of 3
mmoolhuysen
in reply to: patrick.emin

I could not find a way to control the appearance of single button in the ribbon directly. However, it is possible to emulate the behavior quite well, by switching from one pre-defined workspace to another pre-defined workspace. I assume you are a bit familiar with Customize User Interface and workspaces.

 

To do this, You have to take the following step (reads more complicated than it is):

 

  1. Make a alternate image for the button, redraw it in such a way that it appears to be grayed-out
  2. Make a copy of the ribbon panel that contains the button you want the user see as changed. The original panel will be used to show in the initial load of the interface, the second version of the panel will be used to show after the load of the DLL's. Therefore, in the second version of the panel, you have to replace the button image for the grayed-out version of the image, and replace the macro to do nothing (or show an alert box that the stuff has been loaded already). For these two versions of the panel, you may keep the field Display Text identical. This is the panel label as it is shown to the user, so for the user both panel versions will appear to be the one and the same.
  3. Next,  make a copy of the associated ribbon tab. In the second version of the tab, replace the original panel with the version that contains the grayed-out button. Again, for both versions of the tab you may keep the field Display Text identical, for the same reason.
  4. Next, save and customize two different workspaces. The workspace you use initially has to show the tab that contains the panel with the "working" button image and hide the alternative tab. The alternative workspace is intended to be current after the DLL's has been loaded, so this has to hide the initial tab and show the alternative tab that contains the panel with the grayed-out button image.
  5. Finally, the macro of the "working" button in the original panel, should not only load the desired DLL's, but make the alternative workspace current as well. For that second part, you can use (setvar "wscurrent" " [YOUR WORKSPACE NAME] ")

I've been able to roll-out similar pre-defined workspaces for all our users, by saving the workspaces in the Enterprise Customization File. This makes my pre-defined workspaces read-only for users, while still allowing users to save their own personal workspaces.

Message 3 of 3
patrick.emin
in reply to: mmoolhuysen

Thanks for your solution. Its seems the only way to do it.


Patrick Emin animateur de la communauté francophone


Vous avez trouvé un message utile? Alors donnez un "J'aime" à ce message!
Votre question a eu une réponse satisfaisante? Voulez vous avoir l'amabilité de cliquer sur le bouton
 APPROUVER LA SOLUTION  en bas de la réponse qui apporte une solution?
Signez notre Livre d'Or

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost