Regular API function

simGetObjectCustomData

Description Retrieves an object's custom data previously added with the simAddObjectCustomData function. See also simReadCustomDataBlock.
C synopsis simInt simGetObjectCustomData(simInt objectHandle,simInt header,simChar* data)
C parameters
objectHandle: handle of the object
header: identifier of the custom data. See simAddObjectCustomData for details.
data: pointer to a data buffer allocated by the user. Use simGetObjectCustomDataLength to adjust the buffer size.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis string data=simGetObjectCustomData(number objectHandle,number header)
Lua parameters
Same as C-function
Lua return values
nil if operation was not successful. Otherwise the custom data (might be an empty string if custom data doesn't exist).

All regular API functions on one page