Customizing Abaqus/CAE startup

The following example for the onCaeStartup parameter will establish viewport preferences and print options (including a print command), set up a remote execution queue for running Abaqus jobs, and set preferences for contour plots in the Visualization module:

    def onCaeStartup():
    
        # Print preferences
        session.printOptions.setValues(vpDecorations=OFF,
            vpBackground=OFF, rendition=COLOR,
            printCommand='lpr -S server -P printer')
        session.psOptions.setValues(date=OFF, logo=OFF)
        
        def initQueues(*args):
            session.Queue(name='long', hostName='server',
               queueName='large', directory='/tmp')
        addImportCallback('job', initQueues)
    
        # Visualization preferences 
        def setVisPreferences(module, userData):
            import visualization
            session.defaultOdbDisplay.contourOptions.setValues(
               renderStyle=SHADED, visibleEdges=EXTERIOR,
               contourStyle=CONTINUOUS)
        addImportCallback('visualization', setVisPreferences)
Indented text must be valid Python commands. For more queue examples, see The Job module.