Regular API function

simRemoveModel / sim.removeModel

Description
Removes a model from the scene. See also sim.removeObject.
Object destruction always tries to destroy attached scripts before destroying the object itself. If a script tries to destroy the object it is attached to, then the object will first be destroyed, and the script destruction will be delayed.
C/C++
synopsis
simInt simRemoveModel(simInt objectHandle)
C/C++
parameters
objectHandle: handle of the model (i.e. object tagged as model) to remove.
C/C++
return value
-1 if operation was not successful, otherwise the number of removed objects (a model might contain several objects)
Lua synopsis int removedCnt=sim.removeModel(int objectHandle)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Python synopsis int removedCnt=sim.removeModel(int objectHandle)