Category Creo Parametric user interface, Object ProCmd

Function ProCmdActionAdd


Description
Adds a new action to Creo Parametric. This action can be later associated with a push button command in the Creo Parametric Ribbon UI.

This function is executed only once during a Creo Parametric session for each action. Subsequent calls to this function for previously loaded actions return an error.

Replacement in Object TOOLKIT: pfcSession::UICreateCommand
pfcSession::UICreateMaxPriorityCommand
Synopsis
#include <ProUICmd.h>
ProErrorProCmdActionAdd(
char* action_name
/* (In)
The name of the action (must be unique)
*/
uiCmdCmdActFn action_cb
/* (In)
The callback function
*/
uiCmdPriority priority
/* (In)
Defines the priority of the action with respect to other actions that can be invoked during the execution of the action callback function
*/
uiCmdAccessFn access_func
/* (In)
The function that defines the accessibility of the action
*/
ProBoolean allow_in_non_active_window
/* (In)
Defines whether this action can be executed in a nonactive Creo Parametric window
*/
ProBoolean allow_in_accessory_window
/* (In)
Defines whether this action can be executed in an accessory Creo Parametric window
*/
uiCmdCmdId* action_id
/* (Out)
The identifier of the action
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully added the action.
PRO_TK_GENERAL_ERRORThe function failed to add the action.
PRO_TK_E_FOUNDAn action already exists under action_name.

Manual References:

  1. User Interface: Menus, Commands, and Popupmenus: Adding a PushButton
  2. User Interface: Menus, Commands, and Popupmenus: Manipulating Existing Commands
  3. User Interface: Menus, Commands, and Popupmenus: Adding the Command
  4. User Interface: Menus, Commands, and Popupmenus: Adding the Command
  5. User Interface: Menus, Commands, and Popupmenus: Creating Commands for the New Popup Menu Buttons
  6. User Interface: Menus, Commands, and Popupmenus: Creating Commands for the New Popup Menu Buttons

Sample Code References:

  1. pt_af_examples ( PTAFExampleMain.c )
  2. pt_af_examples ( PTAFExampleMain.c )
  3. pt_af_examples ( PTAFExampleMain.c )
  4. pt_af_examples ( PTAFExampleMain.c )
  5. pt_af_examples ( PTAFExampleMain.c )
  6. pt_af_examples ( PTAFExampleMain.c )
  7. pt_async ( TestAsync.c )
  8. pt_autoaxis ( AutoAxis.c )
  9. pt_examples ( TestMain.c )
  10. pt_examples ( TestMain.c )
  11. pt_examples ( TestMain.c )
  12. pt_examples ( TestMain.c )
  13. pt_examples ( TestMain.c )
  14. pt_examples ( TestMain.c )
  15. pt_examples ( TestMain.c )
  16. pt_examples ( TestMain.c )
  17. pt_examples ( TestMain.c )
  18. pt_examples ( TestMain.c )
  19. pt_examples ( TestMain.c )
  20. pt_examples ( TestMain.c )
  21. pt_examples ( TestMain.c )
  22. pt_examples ( TestMain.c )
  23. pt_examples ( TestMain.c )
  24. pt_examples ( TestMenubar.c )
  25. pt_examples ( TestMenubar.c )
  26. pt_examples ( TestMenubar.c )
  27. pt_geardesign ( GearDesign.c )
  28. pt_install_cxx ( TestInstall.cxx )
  29. pt_install_cxx ( TestInstall.cxx )
  30. pt_install_test ( TestInstall.c )
  31. pt_install_test ( TestInstall.c )
  32. pt_mech_examples ( PTMechExampleMain.c )
  33. pt_mech_examples ( PTMechExampleMain.c )
  34. pt_mech_examples ( PTMechExampleMain.c )
  35. pt_mech_examples ( PTMechExampleMain.c )
  36. pt_mech_examples ( PTMechExampleMain.c )
  37. pt_mech_examples ( PTMechExampleMain.c )
  38. pt_udf_examples ( PTUDFExMain.c )
  39. pt_userguide ( UgMain.c )
  40. pt_userguide ( UgMain.c )
  41. pt_userguide ( UgMain.c )
  42. pt_userguide ( UgMain.c )
  43. pt_userguide ( UgMain.c )
  44. pt_userguide ( UgMain.c )
  45. pt_userguide ( UgMain.c )
  46. pt_userguide ( UgMain.c )
  47. pt_userguide ( UgMain.c )
  48. pt_userguide ( UgMain.c )
  49. pt_userguide ( UgPopupmenus.c )
  50. pt_userguide ( UgPopupmenus.c )
  51. pt_userguide ( UgPopupmenus.c )
  52. pt_userguide ( UgPopupmenus.c )
  53. pt_userguide ( UgPopupmenus.c )
  54. pt_userguide ( UgPopupmenus.c )
  55. pt_userguide ( UgPopupmenus.c )
  56. pt_userguide ( UgPopupmenus.c )
  57. pt_userguide ( UgPopupmenus.c )
  58. pt_wc_server ( PTWCServerMain.c )
  59. pt_wc_server ( PTWCServerMain.c )
  60. pt_wc_server ( PTWCServerMain.c )