C_ProcessBatchScript

Call C_ProcessBatchScript to process an OrcaFlex batch script file. For details on OrcaFlex batch script files please refer to the OrcaFlex documentation.

void C_ProcessBatchScript(

TOrcFxAPIHandle ModelHandle,

LPCTSTR lpBatchScriptFileName,

TStringProgressHandlerProc BatchScriptProgressHandlerProc,

TStaticsProgressHandlerProc StaticsProgressHandlerProc,

TDynamicsProgressHandlerProc DynamicsProgressHandlerProc,

const TRunSimulationParameters *lpRunSimulationParameters,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

If you pass the handle of an existing model then the batch script is processed in the context of that model. That is the initial state for the batch script is the state of the model passed in this parameter. Also, once the script has finished processing the model passed in will have been modified by whatever batch script commands were processed.

Alternatively, you can pass NULL for this parameter, in which case an empty model is created and the script is processed in the context of this empty model.

lpBatchScriptFileName (IN)

Points to a null-terminated string containing the name of the batch script file to process.

BatchScriptProgressHandlerProc (IN)

A callback function to handle notifications of the progress of batch script file execution. If you do not want to receive such notifications pass NULL.

StaticsProgressHandlerProc (IN)

A callback function to handle progress notifications during static calculations. If you do not want to receive such notifications pass NULL.

DynamicsProgressHandlerProc (IN)

A callback function to handle progress notifications during simulations. If you do not want to receive such notifications pass NULL.

lpRunSimulationParameters (IN)

Points to a structure holding parameters relating to simulation auto save – see TRunSimulationParameters for details.

Note: The AutoSaveFileName member of this structure is ignored because it is redundant. The batch script command Run specifies the name of the output file and it is this file name which is used when auto save is enabled.

If NULL is passed for this parameter then simulation auto save is disabled.

lpStatus (OUT)

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

Unicode and ANSI

The Unicode function name is C_ProcessBatchScriptW and the ANSI function name is C_ProcessBatchScriptA.

See also

C_CalculateStatics, C_RunSimulation2, StringProgressHandlerProc, StaticsProgressHandlerProc, DynamicsProgressHandlerProc, TRunSimulationParameters.