Regular API function

simSetObjectName / sim.setObjectName

Description Sets the name of an object based on its handle. See also sim.getObjectName.
C synopsis simInt simSetObjectName(simInt objectHandle,const simChar* objectName)
C parameters
objectHandle: handle of the object. By adding sim.handleflag_altname to the object handle, the object alternative name can be set. By adding sim.handleflag_silenterror to the object handle, errors linked to the naming can be suppressed from output.
objectName: name (or alternative name) of the object
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number result=sim.setObjectName(number objectHandle,string objectName)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page