C_GetSimulationComplete

Call C_GetSimulationComplete to find out whether an OrcaFlex simulation has completed.

void C_GetSimulationComplete(

TOrcFxAPIHandle ModelHandle,

BOOL *lpSimulationComplete,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

lpSimulationComplete (OUT)

Points to a boolean variable in which the function's result is stored.

If the simulation is complete then this variable is set to a non-zero value. If the simulation has not completed then the variable is set to zero.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Remarks

A simulation will only be reported as complete when the model is in msSimulationStopped state. The model state can be obtained by calling C_GetModelState.

However, there is a situation in which the model is in msSimulationStopped state and yet the simulation is reported as not complete. This occurs when the simulation is paused. Paused simulations arise in the following ways:

  1. A call to C_PauseSimulation has been made during a simulation.
  2. A completed simulation has been extended by calling C_ExtendSimulation.
  3. A simulation which has been paused and saved in OrcaFlex is subsequently loaded by calling C_LoadSimulation.

See also

C_ExtendSimulation, C_GetModelState, C_LoadSimulation, C_PauseSimulation, C_RunSimulation, C_RunSimulation2.