I have created some button in command manager and I want it show in gray color in part document like some SOLIDWORKS command indicate user the button is invalid ,but i can't find which function can achieve it.
Thanks for your attention.
Similar to this answer: Can I create a command like switch. Just use the ToolbarButtonStates_e.DeselectAndDisable if swApp.ActiveDoc is IPartDoc.
Retrieving data ...