Run a simulation until the next output request is ready.

Syntax

Sub RunSimulationUntilNextOutput()

Remarks

This method starts (or resumes) the simulator, which then runs until the next output request has finished, that is, a block of data becomes available. At this point the simulation pauses. If there is no outstanding output request, the simulator does not run.

This call returns control to the client after the simulation has finished initializing, so the simulator continues to run asynchronously. Use WaitForNextOutput to busy-wait until the outputs are available or allow the SimulationStop event to trigger your event handler.

Example


' Start the simulation
Call Circuit.RunSimulationUntilNextOutput()


' Simulate until the first set out output data is ready
Circuit.WaitForNextOutput


' Make sure the output is ready
Do While (Not Circuit.OutputReady(outputs(0)))
Loop


' Retrieve the outputs
Dim dataArray As Variant
Call Circuit.GetOutputData(outputs(0), dataArray, SimulationInterpolationRaw)

See Also

SetOutputRequest

GetOutputData

Note on Outputs