simPersistentDataWrite

Writes a persistent data block. Persistent data, valid across all opened simulator scenes, remains until the simulator ends, or until it is cleared by writing an empty data block. If the options flag is set appropriately, then persistent data can also be stored on file, and be automatically reloaded next time CoppeliaSim starts

C++ synopsis

int simPersistentDataWrite(const char* dataTag, const char* dataValue, int dataLength, int options)

Arguments

  • dataTag: name of the data block
  • dataValue: content of the data block (which may contain any value, including embedded zeros). If dataValue is an empty string, then the data block is cleared (if present).
  • dataLength: size of the data block.
  • options: bit-coded:
    • bit0 is set (1): data is also stored on file ("system/persistentData.dat"), and automatically reloaded next time CoppeliaSim start

Return

  • -1 if operation was not successful


See also: