Regular API function


Description Reads custom data that is stored inside of an object, a script or a scene (i.e. the data is part of the object, the script or the scene). Reads also custom data for the application's currrent session. See also simWriteCustomDataBlock, simReadCustomDataBlockTags and the data packing/unpacking functions.
C synopsis simChar* simReadCustomDataBlock(simInt objectHandle,const simChar* tagName,simInt* dataSize)
C parameters
objectHandle: handle of the object or script where the data is stored, or sim_handle_scene if the data is stored in the scene, or sim_handle_app if the data is stored in the application's current session.
tagName: a string that identifies the data.
dataSize: a pointer to an integer receiving the size of the returned buffer.
C return value
the custom data block, or nil in case of an error (or if the data is not present). The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis string customDataBlock=simReadCustomDataBlock(number objectHandle,string tagName)
Lua parameters
Same as C-function. In addition, you can specify sim_handle_self for the objectHandle argument, if your target is the current script.
Lua return values
Same as C-function.

All regular API functions on one page