Message 1 of 4
How to Disable Custom CUI buttons

Not applicable
10-17-2016
11:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created a CUI file, which contain my customized buttons. I want to disable some buttons sometimes.
When I click one of my customized button, AutoCAD executes my customized command signdata. All the setting of this command are follow:
Display -- Name CustomSign Appearance -- Button Style Large with Text (Vertical) Group Name Command Command Name CustomSign Description Sign current drawing Extended Help File Command Display Name Sign current drawing Macro ^C^Csigndata Tags Access -- Key Tip Tooltip Title CustomSign Advanced -- ElementID xxx ElementID xxx Images Small image xxx.bmp Large image xxx.bmp
I want to disable this button when system variable tilemode’s value is 1, when tilemode’s value is 0, enable this button again.
I have found this page about Disable Ribbon Buttons.
This page gives a demo as follow:
$(if,$(getvar,cmdactive),~)MOVE^C^C_move
I change the Macro content from ^C^Csigndata to one of follow, but it does not work
$(if,$(eq,$(getvar,tilemode),1),~)SIGNDATA^C^Csigndata $(if,$(eq,$(getvar,tilemode),1),~)MOVE^C^Csigndata
How should I modify the command settings?