sim.writeCustomDataBlock

Adds or removes custom data to be stored and saved together with an object, or the scene. If the tag name ends with the string "@tmp", then the data is not saved during a scene or model save operation. The data can also be saved globally for the application (for the current CoppeliaSim session). If the data is attached to an object, then the sysCall_data callback function is called asynchronously for the child- or customization script attached to that object

Synopsis

sim.writeCustomDataBlock(int objectHandle, string tagName, string/bytes data) sim.writeCustomDataBlock(int objectHandle, string tagName, buffer data)

Arguments

  • objectHandle: handle of the object where you want to store your data, or sim.handle_scene if you wish to store the data with the scene, or sim.handle_app if you wish to store the data with the application's current session
  • tagName: string that identifies the data. An empty string removes all custom data blocks
  • data: your custom data. If empty, the current data under the specified dataName is removed


See also: