Regular API function

simSetReferencedHandles / sim.setReferencedHandles

Description Attaches a list of custom handles to a given scene object. Those custom handles are handles of other objects, that are linked to the given scene object (for whatever purpose). The advantage of storing references to other objects with this function is that V-REP will take care of correctly adjusting the references if needed: For instance, imaging objectA storing the handle of objectB via this function. If objectB is deleted, then the stored handle will become -1. If objectA and objectB are duplicated at the same time, then the duplicate of objectA will store the handle of the duplicate of objectB. See also sim.getReferencedHandles.
C synopsis simInt simSetReferencedHandles(simInt objectHandle,simInt count,const simInt* referencedHandles,const simInt* reserved1,const simInt* reserved2)
C parameters
objectHandle: handle of the scene object that will store the list of handles
count: the number of handles to store
referencedHandles: a list of handles. Handles of following object types are supported: scene objects, collision objects, distance objects, IK groups, collections, and geometric constraint solver objects.
reserved1: reserved for future extensions
reserved2: reserved for future extensions
C return value
-1 in case of an error.
Lua synopsis number result=sim.setReferencedHandles(number objectHandle,table referencedHandles)
Lua parameters
Similar to the C-function
Lua return values
Similar to the C-function

All regular API functions on one page