Disable/Enable Custom CUI buttons

Disable/Enable Custom CUI buttons

Anonymous
Not applicable
955 Views
2 Replies
Message 1 of 3

Disable/Enable Custom CUI buttons

Anonymous
Not applicable

First the user will log in. then using the user's info. I will check which CUI buttons the user is allowed to click and not. 

is there a way to disable/enable the ribbon buttons on the fly? 

 

 

Thanks fellas,

0 Likes
956 Views
2 Replies
Replies (2)
Message 2 of 3

Keith.Brown
Advisor
Advisor

If the buttons are calling AutoCAD commands wouldn't be easier and essentially more correct to disable the autocad command instead?  Basically disabling the button would not stop them from typing the command at the command line or creating a new button to call the command.

 

Instead you should subscribed to the command started event and decide if the user has access to that command and then either allow the command to continue to cancel it.

0 Likes
Message 3 of 3

Anonymous
Not applicable
Keith,

Thank you for your reply. I managed to accomplish it by using Sendstringtoexecute.
0 Likes