GUI Toolset example

The AFXToolsetGui base class provides various toolset infrastructure support functions.

For example, the AFXToolsetGui base class keeps track of the menus in a toolset, along with the toolbar and toolbox buttons, so that they can be swapped in and out automatically as the user changes modules. To create your own toolset GUI, you begin by deriving from the AFXToolsetGui class. Alternatively, if there is another module GUI class that provides most of the functionality that you want, you can begin by deriving from that class and then making modifications. For more information, see Customizing an existing module or toolset.

The following example shows how to create a new toolset class by deriving from AFXToolsetGui:

from abaqusGui import *

class MyToolsetGui(AFXToolsetGui):
   
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def __init__(self):
    
        # Construct the base class
        #
        AFXToolsetGui.__init__(self, toolsetName)
        ...

In the constructor of the new class you call the constructor of the base class. The AFXToolsetGui class takes the following argument:

toolsetName

A String specifying the name of the toolset. The toolset name provides an identifier for the toolset.