To derive a new class, you must know the appropriate class name and you must call that class's constructor in your constructor. The table below lists the class names and registered names for all the Abaqus/CAE modules that are available in the Abaqus GUI Toolkit. You can import these class names from abaqusGui. When you register a module derived from one of the Abaqus/CAE modules, you must use the name shown in the table for the displayedName argument in the main window's registerModule method. If you do not use the name shown, some GUI infrastructure components may not function correctly.
When you register a toolset, you must specify in the registerToolset method in which locations (the menu bar, the toolbar, or the toolbox) the toolset creates the widget. If you omit a toolset location flag, the GUI for that toolset will not appear in that location. The table below shows the class name for each of the Abaqus/CAE toolsets along with the flags that indicate the locations in which the toolset creates the widgets. You can import these class names from abaqusGui. To register the plug-in toolset, you call registerPluginToolset(); you do not use the registerToolset method. When you unregister a toolset, you must use the name shown in the table as the argument to the module's unregisterToolset method.
For an example of how to register the toolsets and modules used by Abaqus/CAE, see Main window example. The following statements show how you could add your own toolset to the Visualization module: # File myVisModuleGui.py: from abaqusGui import * from myToolsetGui import MyToolsetGui class MyVisModuleGui(VisualizationGui): def __init__(self): # Construct the base class. # VisualizationGui.__init__(self) # Register my toolset. # self.registerToolset(MyToolsetGui(), GUI_IN_MENUBAR|GUI_IN_TOOLBOX) MyVisModuleGui() # File myMainWindow.py: from abaqusGui import * class MyMainWindow(AFXMainWindow): def __init__(self, app, windowTitle=''): ... self.registerModule('Visualization', 'myVisModuleGui') ... If you derive a toolset from an Abaqus/CAE toolset, you must construct that toolset using the makeCustomToolsets method of AFXMainWindow. You must use the makeCustomToolsets method to ensure that the toolset is created at the appropriate time during application startup. This will avoid any conflicts with Abaqus/CAE modules that also make use of the module. For example, if you derive a new toolset from the Datum toolset, you must create the new toolset in makeCustomToolsets. This approach is illustrated in the following example. The new toolset will also appear in the Part module in place of the standard Datum toolset. # In your main window file: class MyMainWindow(AFXMainWindow): def __init__(self, app, windowTitle=''): ... def makeCustomToolsets(self): from myDtmToolsetGui import MyDtmGui # Store the toolset as a member of the main window if # you want to register it in one of your modules too. # self.myDtmGui = MyDtmGui() # In your module GUI file: class MyModuleGui(AFXModuleGui): def __init__(self): ... mw = getAFXApp().getAFXMainWindow() self.registerToolset(mw.myDtmGui, GUI_IN_TOOL_PANE|GUI_IN_TOOLBOX) |