Scan Results, Suppress Any with Invalid Display Times, and Evaluate

Goal: Scan all result objects in your first analysis, suppress any results with invalid display times, and then evaluate all results.

Code:

aset = Model.Analyses[0].AnalysisSettings
OrigStep = aset.CurrentStepNumber
aset.CurrentStepNumber = aset.NumberOfSteps
FinalTime = aset.StepEndTime
aset.CurrentStepNumber = OrigStep
sol = Model.Analyses[0].Solution
for obj in sol.Children:
    if hasattr(obj,"DisplayTime"):
        if obj.DisplayTime > FinalTime:
            obj.Suppressed = True
sol.EvaluateAllResults()