Regular API function

simGetDistanceHandle / sim.getDistanceHandle

Description Retrieves the handle of a distance object. The operation of this function depends on the current name suffix settings (see sim.getNameSuffix, sim.setNameSuffix, and the section on accessing general-type objects). See also sim.isHandleValid.
C synopsis simInt simGetDistanceHandle(const simChar* distanceObjectName)
C parameters
distanceObjectName: name of distance object. If the name is appended by a "@silentError" suffix, then no error will be output if the distance object does not exist.
C return value
handle of the distance object or -1 if operation was not successful
Lua synopsis number distanceObjectHandle=sim.getDistanceHandle(string distanceObjectName)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxGetDistanceHandle
Legacy remote API: simxGetDistanceHandle

All regular API functions on one page