An Example of a Preprocessing User Script

You can execute a preprocessing user-supplied module called userscript_cae_pre.py. The Abaqus component executes the preprocessing module after opening a reference copy of the Abaqus/CAE model database file.

If the userscript_cae_pre.py or userscript_cae_post.py modules are present in the same directory as the Abaqus/CAE model database file at the time of the file scan, the component automatically generates file parameters to ensure that these scripts are copied to the execution directory at run time.

An example of userscript_cae_pre.py is shown below:

from abaqus import *
from abaqusConstants import *
import __main__
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior

def runUserScript(mdb, values):
    models = mdb.models
    p = models['Model-1'].parts['Part-1']
    
p.features['Round-3'].setValues(radius=(float(values['Model_1__Part_1_
_Round_2__radius']) - 0.4))
    p.regenerate()

In this example preprocessing script the value of Round-3 is modified as a function of Round-2.