Regular API function

simGetObjects / sim.getObjects

Description Retrieves object handles. Use this in a loop where index starts at 0 and is incremented to get all object handles in the scene. See also sim.getObjectsInTree.
C synopsis simInt simGetObjects(simInt index,simInt objectType)
C parameters
index: object index (not handle!). First object is located at index 0
objectType: object type (sim_object_shape_type, sim_object_joint_type, etc. (see the object types) or sim_handle_all for any type of object
C return value
handle of the object or -1 if no object is located at that index or in case of an error
Lua synopsis int objectHandle=sim.getObjects(int index,int objectType)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Remote API equiv.
B0-based remote API: simxGetObjects
Legacy remote API: simxGetObjects