Regular API function

simPersistentDataWrite / sim.persistentDataWrite

Description 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. See also sim.persistentDataRead, sim.setStringSignal, sim.setInt32Signal, sim.setDoubleSignal and sim.writeCustomDataBlock.
C/C++
synopsis
simInt simPersistentDataWrite(const simChar* dataTag,const simChar* dataValue,simInt dataLength,simInt options)
C/C++
parameters
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: the size of the data block.
options: bit-coded. If bit 0 is set (1), then the data is also stored on file ("system/persistentData.dat"), and automatically reloaded next time CoppeliaSim start.
C/C++
return value
-1 if operation was not successful
Lua synopsis sim.persistentDataWrite(string dataTag,string dataValue,int options=0)
Lua parameters
Similar to the C-function counterpart
Lua return values
Python synopsis sim.persistentDataWrite(string dataTag,string/bytes dataValue,int options=0)