10.2 The File toolset

The File toolset contains a method called getPrintForm that allows you to access the form that posts the Print dialog box. See Print dialog box, Section 5.7.2, for an example of how to use the getPrintForm method.

In addition, the ABAQUS GUI Toolkit provides two virtual methods that you can modify to change the behavior of your application when a database is opened. Normally, after an output database is opened, ABAQUS/CAE will enter the Visualization module. Similarly, if you are in the Visualization module and you open a model database, ABAQUS/CAE enters the first module listed in the Module list in context bar. To change this behavior, you can overwrite the switchToOdbModule and switchToMdbModule methods. These methods return True if they are successful. For example:

from abaqusGui import *

class MyFileToolsetGui(FileToolsetGui):

    def switchToMdbModule(self):

        # Always switch to the Property module
        currentModuleGui = getCurrentModuleGui()
        if currentModuleGui and \
            currentModuleGui.getModuleName() != 'Property':
                switchModule('Property')
        return True

    def switchToOdbModule(self):

        # Do not switch modules
        return True