Using Scripts to Provide Additional Pre- and Postprocessing Functionality

The Abaqus component executes two specific user-supplied Python modules, if they exist. These modules must be called userscript_cae_pre.py and userscript_cae_post.py. You can leverage these scripts to operate on parameters in the Abaqus/CAE model database that are not yet supported by the component or to perform other operations needed to produce the Abaqus input file.

Related Topics
An Example of a Preprocessing User Script

You can define one, both, or neither of these modules. The Abaqus component executes the preprocessing module, userscript_cae_pre.py, after opening a reference copy of the Abaqus/CAE model database file. The postprocessing module, userscript_cae_post.py, is executed before the Abaqus component writes solver input file for all jobs defined in the Abaqus/CAE model database. For more information, see How the Component Interacts with Abaqus/CAE.

The call to the userscript_cae_pre.py module is as follows:

if os.path.exists('userscript_cae_pre.py'):
import userscript_cae_pre
userscript_cae_pre.runUserScript(mdb, values)

where mdb is the model database and values is a name:value array of inputs.

The call to the userscript_cae_post.py module is as follows:

if os.path.exists('userscript_cae_post.py'):
import userscript_cae_post
userscript_cae_post.runUserScript(mdb, values)

where mdb is the model database and values is a name:value array of inputs.