RunSimulation
- Updated2026-03-24
- 1 minute(s) read
Starts or resumes a simulation.
Syntax
Sub RunSimulation ( _
ByVal numSeconds As Double, _
ByVal pause As Boolean)
Parameters
numSeconds—Number of seconds to run the simulation, in terms of simulation time, not real-time.
pause—Flag indicating whether the simulation should pause or stop after simulation finishes.
Remarks
Runs the simulation for the number of seconds specified by numSeconds. At the end of the time period, the simulation pauses (if the parameter pause is true) or stops.
A subsequent call to ResumeSimulation (if paused) simulates for another numSeconds of simulation time.
After the simulation has initialized, control is returned to the client, so the simulator continues to run asynchronously.
Note that events from outputs can continue to be received after the simulation has entered its stopped/paused state, so it is possible for many output data sets for a given output to accumulate during a simulation run.
Note: Make sure the simulation time requested is long enough that you get enough samples. Otherwise you will get an error, such as "Output not found"-this means there isn't enough data available to fill one block.
If a simulation is paused, ResumeSimulation resumes it.
Simulation setting are taken from the Transient Analysis settings of the chosen circuit. Any other analysis settings, including Interactive Settings, are ignored.
Example
See example for OutputReady.
See Also