C_SetSimulationDrawTime

C_SetSimulationDrawTime sets the model's simulation draw time.

The simulation draw time controls the way drawing functions (C_CreateModel3DViewBitmap, C_SaveModel3DViewBitmapToFile, etc.) behave. These functions draw an OrcaFlex model and the simulation time used for this drawing is controlled by this function. This allows you to produce drawings of the OrcaFlex model at a number of different points of a simulation. The C_GetSimulationDrawTime function can be called to retrieve the current value of simulation draw time.

void C_SetSimulationDrawTime(

TOrcFxAPIHandle ModelHandle,

double Value,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

Value (IN)

The simulation time used by drawing functions. Subsequent calls to drawing functions will use the time specified by this parameter when drawing the model.

If the simulation draw time is before the start of the simulation then the model will be drawn at the simulation start (i.e. the beginning of the build-up period). Likewise if the simulation draw time is after the end of the simulation then the model will be drawn at the simulation end.

If you wish to draw the model in its latest state then you should pass OrcinaDefaultReal() for this parameter. By latest state we mean the configuration of the model after the latest calculation. In more detail this is:

  1. If the model is in reset state then the reset model configuration is used.
  2. If the model is calculating statics then the configuration of the model after the latest iteration of the static calculation is used.
  3. if the model has successfully completed statics and the simulation has not been started then the static configuration is used.
  4. If a simulation is active (i.e. if C_GetModelState returns a value ≥ msRunningSimulation) then the configuration of the model after the latest time step of the simulation is used.

lpStatus (OUT)

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

See Also

C_CreateModel3DViewBitmap, C_DrawModel3DViewToBitmapCanvas, C_GetSimulationDrawTime, C_SaveModel3DViewBitmapMem, C_SaveModel3DViewBitmapToFile, C_SaveModel3DViewMetafileMem, C_SaveModel3DViewMetafileToFile.