Hi Team,
I am trying to create an automation script in the Sequencer to print the overrun count after each simulation run.
With the script below, I am encountering the error shown in the description.
The error indicates that the HYPERSIM Python API does not expose the method: getSimulationOverruns()
**python script: **
from modules.hypersim_connection import connect
import time
api = connect()
api.startSim()
time.sleep(5)
overruns = api.getSimulationOverruns()
print(
f"Overrun Count = {overruns}"
)
api.stopSim()
Console output:
Connecting to HyWorks…
[2026-10-16 17:18:11,424][RegistryApiTool][INFO] Getting Running Services of type HyWorks on service port 13520
[2026-10-16 17:18:11,434][RegistryApiTool][INFO] Getting Application Services for HyWorks
[2026-10-16 17:18:11,443][RegistryApiTool][INFO] Connecting to /administrator/hyworks-1 pid 39848 on port 50992
[2026-10-16 17:18:11,443][RegistryApiTool][INFO] Connected!
[2026-10-16 17:18:11,450][HyWorksPythonApi][INFO] Connected to HyWorks in 0.026s
Starting and connecting to HYPERSIM…
[2026-10-16 17:18:11,450][RegistryApiTool][INFO] Getting Running Services of type HyWorks on service port 13520
[2026-10-16 17:18:11,450][RegistryApiTool][INFO] Getting Application Services for HyWorks
[2026-10-16 17:18:11,458][RegistryApiTool][INFO] Connecting to /administrator/hyworks-1 pid 39848 on port 50992
[2026-10-16 17:18:11,458][RegistryApiTool][INFO] Connected!
[2026-10-16 17:18:11,458][HyWorksPythonApi][INFO] Connected to HyWorks in 0.008s
[2026-10-16 17:18:11,458][HyWorksPythonApi][WARNING] Connected to an existing HyWorks session during the startAndConnectHypersim
Opening design…
Traceback (most recent call last):
File “C:\Users\Administrator\OneDrive - Hitachi Energy\Projects\PWC\CVT\CVTValidationResults\FunctionLevel\24Sep\PreProcessing\testoverrun.py”, line 10, in
overruns = api.getSimulationOverruns()
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError:
module ‘HyWorksApiGRPC’ has no attribute ‘getSimulationOverruns’. Did you mean: ‘getSimulationTimings’?
Current Environment:
HYPERSIM Version: 2026.3.3.o33 (latest version available in the Download Center)
Could someone please advise on the recommended way to retrieve the overrun count programmatically?
As an alternative, I tried using: getSimulationPerformanceTimings()
which returns a field named: num_stretched_step
As a workaround, I assumed that this might be the closest available indicator of overruns. However, I am not sure whether this interpretation is correct.
Could you please help with:
1.The correct method (if any) to retrieve the actual overrun count from the Python API.
2.Whether num_stretched_step can be considered a valid substitute for overruns.
3.Any alternative approach to monitor or log overrun information after each simulation run from the Sequencer.