C_RunSimulation2 |
Call C_RunSimulation2 to run an OrcaFlex simulation. This function is the equivalent of selecting Calculation | Run simulation from the OrcaFlex menu.
void C_RunSimulation2(
TOrcFxAPIHandle ModelHandle,
TDynamicsProgressHandlerProc DynamicsProgressHandlerProc,
const TRunSimulationParameters *lpRunSimulationParameters,
int *lpStatus
);
The handle of the model.
A callback function to handle progress notifications. If you do not want to receive progress notification pass NULL.
Points to a structure holding extra parameters for C_RunSimulation2. These parameters are to do with simulation auto save. See TRunSimulationParameters for details.
If NULL is passed for this parameter then simulation auto save is disabled. In this case C_RunSimulation2 behaves identically to C_RunSimulation.
Points to a variable in which the status result for the function call will be returned.
The model must be in the correct state (either msInStaticState or msSimulationStopped) before calling C_RunSimulation2. To find out what state the model is you can call C_GetModelState.
The model will be in state msInStaticState immediately following a successful call to C_CalculateStatics. Following successful calls to C_ExtendSimulation or C_LoadSimulation the model will be in state msSimulationStopped.
If the simulation goes unstable then the simulation will be aborted. When this happens C_RunSimulation2 exits and returns stOK for the status and the model is placed in state msSimulationStoppedUnstable. You should test the model state by calling C_GetModelState.
The Unicode function name is C_RunSimulation2W and the ANSI function name is C_RunSimulation2A.
C_CalculateStatics, C_ExtendSimulation, C_GetModelState, C_LoadData, C_LoadSimulation, C_RunSimulation, C_SaveData, C_SaveSimulation, DynamicsProgressHandlerProc, TRunSimulationParameters.