Function ProCmdOptionAdd
Description
Adds a new option to Creo Parametric. This option can be later associated with a checkbutton or radio button group in the Creo Parametric Ribbon UI.
This function is executed only once during a Creo Parametric session for each option. Subsequent calls to this function for previously loaded options are ignored.
Synopsis
#include <ProUICmd.h>
ProCmdOptionAdd
(
char* option_name
/* (In)
The name of the option (must be unique)
*/
uiCmdCmdActFn option_cb
/* (In)
The callback function activated when the button is clicked (Radio type) or checked (Check type).
*/
ProBoolean boolean_operation
/* (In)
When PRO_B_TRUE, button is Check type. When PRO_B_FALSE, button is Radio type.
*/
uiCmdCmdValFn set_value_cb
/* (In)
The callback function that defines the value of the option.
*/
uiCmdAccessFn access_func
/* (In)
The function that defines the accessibility of the option
*/
ProBoolean allow_in_non_active_window
/* (In)
Defines whether this option can be changed in a nonactive Creo Parametric window
*/
ProBoolean allow_in_accessory_window
/* (In)
Defines whether this option can be changed in an accessory Creo Parametric window
*/
uiCmdCmdId* option_id
/* (Out)
The identifier of the option
*/
)
Returns
The function successfully added the option.
The function failed to add the option.
An option already exists under option_name.
Sample Code References
User Guide References
これは役に立ちましたか?