Creating and running your own scripts

Almost every operation that you perform during an Abaqus/CAE session can be duplicated by a script (script_name.py) containing a set of Abaqus Scripting Interface commands. Conversely, running a script from within Abaqus/CAE is equivalent to performing the corresponding operations using the menus, toolboxes, and dialog boxes that Abaqus/CAE provides.

You can create scripts that duplicate operations you perform routinely during a session; for example, you might write a script that defines the material properties of a commonly used material or one that produces a contour plot of a particular variable shown in a particular view orientation.

Abaqus/CAE commands are written in the Python scripting language, and you can use Python to enhance the scripts generated by Abaqus/CAE. Commands are stored as ASCII text in the replay, journal, and recovery files and in Abaqus/CAE scripts that you create. As a result, you can use a standard text editor to edit the contents of the files. For more information on commands, see the Abaqus Scripting User's Guide.

To run a script, select FileRun Script from the main menu bar, and select the script to run from the Run Script dialog box.

Note:

You should use the recover option from the Abaqus/CAE execution procedure to run a journal file and recreate a saved model database. (Type abaqus cae recover=model_database_name.jnl.) Selecting FileRun Script to run a journal file may result in an incomplete model database.

You can also create and run scripts using the Abaqus Python development environment (Abaqus PDE). The Abaqus Scripting Interface commands in the scripts must be run in the kernel workspace in the Abaqus PDE. For more information on the Abaqus PDE, see The Abaqus Python Development Environment.