Regular API function

simSaveModel / sim.saveModel

Description Saves a model (an object marked as "Object is model base" and all other objects in its hierarchy tree). Any existing file with same name will be overwritten. See also sim.loadModel, and sim.saveScene.
C/C++
synopsis
simInt simSaveModel(int baseOfModelHandle,const simChar* filename)
C/C++
parameters
baseOfModelHandle: handle of an object marked as "Object is model base"
filename: model filename. The filename extension is required (ttm, or simmodel.xml)
C/C++
return value
-1 if operation was not successful
Lua
synopsis
buffer modelData=sim.saveModel(int baseOfModelHandle,string filename=nil)
Lua
parameters
baseOfModelHandle: handle of an object marked as "Object is model base"
filename: model filename. The filename extension is required (ttm, or simmodel.xml ). If this argument is omitted, then the model will be saved to a buffer which will be returned
Lua
return values
modelData: a buffer containing the saved model, if the model was specified to be saved to memory.
Python
synopsis
bytes buffer=sim.saveModel(int baseOfModelHandle,string filename=None)

<