How to disable my command item?

How to disable my command item when user uses other feature?

SWX is disabling all features when PropertyMenagerPage is open, but my feature/command item is still active.

SolidworksApi macros