How to make the command grey?

How to make the command grey, that is, unable to operate?


That can be achieved via .NET API for your own custom actions/commands by assigning canExecute handler for the ActionItem.

It’s explained in the .NET webinar at 53:50

EDIT: The vcCommand Enabled property (Python API) should do the trick but seems not to work


Thank you very much. I also tried using the Enabled property of vcCommand, but it did not work.

If I have to use the .NET API, I think I should study the C# language first.