
Defines the behavior of the custom buttons defined in method List < EpmRibbonAction > GetRibbonComponents();, meaning when the buttons are displayed and when they are enabled.
public List<AddInCommand> GetCustomCommands()
{
List<AddInCommand> commands = newList<AddInCommand>();
commands.Add(newAddInCommand(PlusButton, AddInState.HasActiveConnection | AddInState.ActiveDocumentIsInputable));
commands.Add(newAddInCommand(StarButton, AddInState.HasActiveConnection));
commands.Add(newAddInCommand(RecordButton, AddInState.HasActiveConnection, AddInState.HasActiveConnection));
return commands;
}
The method returns the following list of actions:
These actions create a list of commands for the EPM plug-in.
public List<AddInCommand> GetCustomCommands()
{
List<AddInCommand>
commands = newList<AddInCommand>(); The PlusButton is enabled only if the current worksheet of the EPM plug-in is connected and is an input form (when the "Use as Input Form" option is selected).
commands.Add(newAddInCommand(PlusButton, AddInState.HasActiveConnection | AddInState.ActiveDocumentIsInputable));
commands.Add(newAddInCommand(StarButton, AddInState.HasActiveConnection));
commands.Add(newAddInCommand(RecordButton, AddInState.HasActiveConnection, AddInState.HasActiveConnection)); return commands; }