Reading results data

The following list describes the objects in results data and the commands you use to read results data. As with model data you will find it useful to use the keys() method to determine the keys of the results data repositories.

Steps

Steps are stored in the steps repository under the Odb object. The key to the steps repository is the name of the step. The following statements print out the keys of each step in the repository:

for stepName in odb.steps.keys():
  print(stepName)

The resulting output is

Step-1
Step-2
Step-3

Note:

An index of 0 in a sequence refers to the first value in the sequence, and an index of −1 refers to the last value. You can use the following syntax to refer to an individual item in a repository:

step1 = odb.steps.values()[0]
print(step1.name)

The resulting output is

Step-1

Frames

Each step contains a sequence of frames, where each increment of the analysis (or each mode in an eigenvalue analysis) that resulted in output to the output database is called a frame. The following statement assigns a variable to the last frame in the first step:

lastFrame = odb.steps['Step-1'].frames[-1]