Regular API function

simGetObject / sim.getObject

Description Retrieves an object handle based on its path and alias. See also sim.isHandle, and sim.getObjectUid.
C/C++
synopsis
simInt simGetObject(const simChar* objectPath,simInt index,simInt proxy,simInt options)
C/C++
parameters
objectPath: the path and alias of the object to find. See the section on accessing scene objects for details.
index: fetches the n-th object (zero based index) that satisfies the object path. -1 returns the first object that satisfies the object path.
proxy: if different from -1, specifies an object handle that identifies a hierarchy tree to search in.
options: bit-coded. bit0 set (i.e. 1): errors are silent.
C/C++
return value
handle of object or -1 if operation was not successful
Lua
synopsis
int objectHandle=sim.getObject(string objectPath,table options={})
Lua
parameters
objectPath: the path and alias of the object to find. See the section on accessing scene objects for details.
options: optional table indicating how the object should be searched. {noError=true} will generate a silent error if an object was not found. {index=n} will fetch the n-th object (zero based index) that satisfies the specified objectPath. {proxy=proxyObjectHandle} allows to search the hierarchy tree of the specified proxy object.
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int objectHandle=sim.getObject(string objectPath,dict options={})

<