mjmiddle
Ansys Employee

Your code is reading the time history directly from the Mechanical GUI panel, and you can't do that when updating through design points, because it opens Mechanical in the background (without the GUI):

Pane=ExtAPI.UserInterface.GetPane(MechanicalPanelEnum.TabularData)
Con = Pane.ControlUnknown
for R in range(1,Con.RowsCount+1):
    for C in range(2,Con.ColumnsCount+1):
        cellText = Con.cell(R, C).Text
        file_handle.write("%s;" % cellText)
    file_handle.write("\n")

One way to resolve this would be to use the objects under the result object to obtain the max, min, avg:

item.GetType() == Ansys.ACT.Automation.Mechanical.Results.ThermalResults.TemperatureResult
item.Maximum
item.Minimum
item.Average

You will need to get the result set time list or the number of result sets and either set the display time or set result object by result set number and evaluate for each result in a loop:

reader = analysis.GetResultsData()
rsets = reader.ResultSetCount
item.By = Ansys.Mechanical.DataModel.Enums.SetDriverStyle.ResultSet
for rset in range(1,rsets+1):
    item.SetNumber = rset
    item.EvaluateAllResults()
    # get max,min,avg and write to csv file

or:

rtimes = reader.ListTimeFreq
for rtime in rtimes:
    item.DisplayTime = rtime
    item.EvaluateAllResults()
    # get max,min,avg and write to csv file