Skip to main content

Basic scripting

The scripting language of ACP is Python which is an object oriented programming language. The user should have some basics experience in object oriented programming for the optimal use, but a basic script can easily be written by modifying an existing one or copy and paste from the History or Shell view. An example of one command is given below. In this command, the density of the material Corecell_A450 is defined (or modified if already defined) as 90.
The easiest way to use scripting is to generate a script with the Graphical User Interface. Every action performed via the GUI is written to the History view. Use copy and paste to create your own scripts with a text editor. Save the scripts as *.py file and use the Run Script… functionality in the File Menu to run your script. In the case of an error, check the Shell view for more details. The aforementioned approach may be limited when it comes to retrieving solution results or specific model information. The section Advanced scripting lists several examples of to how to access such information via a script. Additionally, an example of a python script is given in the Class40 example folder in the ACP installation directory. The update_materials.py file defines stress limits, Puck and Tsai-Wu constants for the UD and core materials. A list of common commands used to retrieve or modify data is shown below.

Advanced scripting

These examples are provided as a guide to more involved commands in the shell view. They all refer to the example model Kiteboard. Maximum Layup Thickness
Maximum Ply Thickness