GUI plug-in registration commands

GUI plug-in commands register GUI plug-ins either in the Plug-ins menu or in a toolbox.


registerGuiMenuButton(...)

Registers a GUI plug-in in the Plug-ins menu.

Path
toolset.registerGuiMenuButton

Required arguments

object

The GUI object to which a (messageId, SEL_COMMAND) message will be sent. The object must have been inherited from FXObject.

buttonText

A String specifying the text to be displayed in the Plug-ins menu. Use a pipe ( | ) between words to specify submenus. The default value is the empty string.

Optional arguments

messageId

An Int specifying the ID to be used when sending a command to the GUI object. The default value is AFXMode.ID_ACTIVATE.

icon

A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information, see afxCreateIcon in the “Auxiliary functions” section of this guide. The default value is None.

kernelInitString

A String specifying the string sent to the kernel the first time this plug-in is invoked. The string is intended to initialize the kernel (typically by importing modules) in preparation for commands that will be sent by this plug-in’s GUI. The default value is the empty string.

applicableModules

The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”, “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.

version

A String specifying the version of the plug-in. The version is displayed in the About Plug-ins dialog box. The default value is “N/A”.

author

A String specifying the author of the plug-in. The author is displayed in the About Plug-ins dialog box. The default value is “N/A”.

description

A String specifying the description of the plug-in. The description is displayed in the About Plug-ins dialog box. The default value is “N/A”.

helpUrl

A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can be loaded in a web browser from the View button in the About Plug-ins dialog box. The default value is “N/A”.

Return value

None

Exceptions

None.


registerGuiToolButton(...)

Registers a GUI plug-in in a toolbox.

Path
toolset.registerGuiToolButton

Required arguments

toolboxName

A String specifying the name of the toolbox in which the button will be shown. The name appears in the toolbox title bar.

object

The GUI object to which a (messageId, SEL_COMMAND) message will be sent. The object must have been inherited from FXObject.

Optional arguments

messageId

An Int specifying the ID to be used when sending a command to the GUI object. The default value is AFXMode.ID_ACTIVATE.

buttonText

A String specifying the text to be displayed in the Plug-ins menu. The default value is the empty string.

icon

A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information, see afxCreateIcon in the “Auxiliary functions” section of this guide. The default value is None.

kernelInitString

A String specifying the string sent to the kernel the first time this plug-in is invoked. The string is intended to initialize the kernel (typically by importing modules) in preparation for commands that will be sent by this plug-in’s GUI. The default value is the empty string.

applicableModules

The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”, “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.

version

A String specifying the version of the plug-in. The version is displayed in the About Plug-ins dialog box. The default value is “N/A”.

author

A String specifying the author of the plug-in. The author is displayed in the About Plug-ins dialog box. The default value is “N/A”.

description

A String specifying the description of the plug-in. The description is displayed in the About Plug-ins dialog box. The default value is “N/A”.

helpUrl

A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can be loaded in a web browser from the View button in the About Plug-ins dialog box. The default value is “N/A”.

Return value

None

Exceptions

None.