Regular API reference

The list of API functions below allows you to access many CoppeliaSim parameters. There are however too many parameters in CoppeliaSim to have a specific API function for each one of them. Auxiliary parameters can be accessed via a set of given functions that use object parameter IDs. Refer also to the global parameter IDs.
All units going to, or coming from the API are in meters, kilograms, seconds and radians or a combination of those (unless otherwise explicitly indicated).

File operations

sim.closeScene sim.saveScene sim.loadScene sim.saveModel sim.loadModel sim.importShape sim.importMesh sim.exportMesh sim.launchExecutable sim.createTexture
simCloseScene simSaveScene simLoadScene simSaveModel simLoadModel simDoesFileExist simImportShape simImportMesh simExportMesh simCreateTexture

General object handle retrieval

sim.getObject sim.getObjectFromUid sim.isHandle sim.getObjects sim.getObjectsInTree sim.getCollectionObjects sim.setReferencedHandles sim.getReferencedHandles sim.getReferencedHandlesTags
simGetObject simGetObjectFromUid simIsHandle simGetObjects simGetObjectsInTree simGetCollectionObjects simSetReferencedHandles simGetReferencedHandles

General functionality handling

sim.handleSimulationScripts sim.handleEmbeddedScripts sim.handleAddOnScripts sim.handleSandboxScript

Collision detection

sim.checkCollision sim.checkCollisionEx
simCheckCollision simCheckCollisionEx

Minimum distance calculation

sim.checkDistance
simCheckDistance

Dynamics

sim.handleDynamics sim.setJointTargetPosition sim.setJointTargetVelocity sim.readForceSensor sim.getJointForce sim.getJointTargetForce sim.setJointTargetForce sim.addForce sim.addForceAndTorque sim.getVelocity sim.getLinkDummy sim.setLinkDummy sim.resetDynamicObject sim.addParticleObject sim.addParticleObjectItem sim.removeParticleObject sim.getContactInfo sim.getShapeMass sim.setShapeMass sim.getShapeInertia sim.setShapeInertia sim.computeMassAndInertia sim.createForceSensor sim.isDynamicallyEnabled See also: physics engine parameter functions.
simHandleDynamics simSetJointTargetPosition simSetJointTargetVelocity simReadForceSensor simGetJointForce simGetJointTargetForce simSetJointTargetForce simAddForce simAddForceAndTorque simGetVelocity simGetLinkDummy simSetLinkDummy simResetDynamicObject simGetContactInfo simGetShapeMass simSetShapeMass simGetShapeInertia simSetShapeInertia simComputeMassAndInertia simCreateForceSensor simConvexDecompose simGetQHull simGetDecimatedMesh simIsDynamicallyEnabled

Dummies

sim.createDummy sim.getLinkDummy sim.setLinkDummy See also: object parameter functions and parameters related to dummies.
simCreateDummy simGetLinkDummy simSetLinkDummy

Scripts

sim.createScript sim.getRandom sim.getScript sim.isHandle sim.initScript sim.callScriptFunction sim.getScriptFunctions sim.executeScriptString sim.getApiFunc sim.getApiInfo sim.handleSimulationScripts sim.handleEmbeddedScripts sim.handleAddOnScripts sim.handleSandboxScript sim.registerScriptFuncHook sim.getStackTraceback See also: functions related to script parameters
simCreateScript simGetScriptHandleEx simIsHandle simInitScript simCallScriptFunctionEx simExecuteScriptString simGetApiFunc simGetApiInfo simResetScript simRegisterScriptCallbackFunction simRegisterScriptVariable simRegisterScriptFuncHook

Joints

sim.setJointPosition sim.getJointPosition sim.setJointTargetPosition sim.getJointTargetPosition sim.setJointTargetVelocity sim.getJointTargetVelocity sim.getJointVelocity sim.getObjectChildPose sim.setObjectChildPose sim.setJointInterval sim.getJointInterval sim.getJointType sim.createJoint sim.setJointMode sim.getJointMode sim.setJointDependency sim.getJointDependency sim.getJointForce sim.getJointTargetForce sim.setJointTargetForce See also: object parameter functions and parameters related to joints. physics engine parameter functions.
simSetJointPosition simGetJointPosition simSetJointTargetPosition simGetJointTargetPosition simSetJointTargetVelocity simGetJointTargetVelocity simGetJointVelocity simGetObjectChildPose simSetObjectChildPose simSetJointInterval simGetJointInterval simGetJointType simCreateJoint simSetJointMode simGetJointMode simSetJointDependency simGetJointDependency simGetJointForce simGetJointTargetForce simSetJointTargetForce

Shapes

sim.addForce sim.addForceAndTorque sim.getVelocity sim.getShapeColor sim.setShapeColor sim.getShapeTextureId sim.setShapeTexture sim.createShape sim.createPrimitiveShape sim.createHeightfieldShape sim.getShapeMesh sim.getShapeViz sim.getShapeGeomInfo sim.getShapeMass sim.setShapeMass sim.getShapeInertia sim.setShapeInertia sim.computeMassAndInertia sim.groupShapes sim.ungroupShape sim.importShape sim.alignShapeBB sim.relocateShapeFrame sim.getShapeBB sim.setShapeBB sim.getExtensionString sim.generateTextShape See also: object parameter functions and parameters related to shapes. physics engine parameter functions.
simAddForce simAddForceAndTorque simGetVelocity simGetShapeColor simSetShapeColor simGetShapeTextureId simSetShapeTexture simCreateShape simCreatePrimitiveShape simCreateHeightfieldShape simGetShapeMesh simGetShapeViz simApplyTexture simGetShapeGeomInfo simGetShapeMass simSetShapeMass simGetShapeInertia simSetShapeInertia simComputeMassAndInertia simGroupShapes simUngroupShape simImportShape simConvexDecompose simGetQHull simGetDecimatedMesh simAlignShapeBB simRelocateShapeFrame simGetExtensionString

Proximity sensors

sim.handleProximitySensor sim.readProximitySensor sim.resetProximitySensor sim.checkProximitySensor sim.checkProximitySensorEx sim.checkProximitySensorEx2 sim.createProximitySensor See also: object parameter functions and parameters related to proximity sensors.
simHandleProximitySensor simReadProximitySensor simResetProximitySensor simCheckProximitySensor simCheckProximitySensorEx simCheckProximitySensorEx2 simCreateProximitySensor

Vision sensors

sim.handleVisionSensor sim.readVisionSensor sim.resetVisionSensor sim.checkVisionSensor sim.checkVisionSensorEx sim.getVisionSensorDepth sim.getVisionSensorImg sim.setVisionSensorImg sim.getVisionSensorRes sim.adjustView sim.createVisionSensor sim.getExtensionString See also: object parameter functions and parameters related to vision sensors.
simHandleVisionSensor simReadVisionSensor simResetVisionSensor simCheckVisionSensor simCheckVisionSensorEx simGetVisionSensorDepth simGetVisionSensorImg simSetVisionSensorImg simGetVisionSensorRes simAdjustView simCreateVisionSensor simGetExtensionString

Force sensors

sim.readForceSensor sim.createForceSensor See also: object parameter functions and parameters related to force sensors.
simReadForceSensor simCreateForceSensor

Graphs

sim.addGraphStream sim.setGraphStreamTransformation sim.setGraphStreamValue sim.addGraphCurve sim.destroyGraphCurve sim.duplicateGraphCurveToStatic sim.handleGraph sim.resetGraph See also: object parameter functions and parameters related to graphs.
simAddGraphStream simSetGraphStreamTransformation simSetGraphStreamValue simAddGraphCurve simDestroyGraphCurve simDuplicateGraphCurveToStatic simHandleGraph simResetGraph

Lights

sim.getLightParameters sim.setLightParameters sim.getExtensionString See also: object parameter functions and parameters related to lights.
simGetLightParameters simSetLightParameters simGetExtensionString

Cameras

sim.cameraFitToView sim.adjustView sim.getExtensionString See also: object parameter functions and parameters related to cameras.
simCameraFitToView simAdjustView simGetExtensionString

OC trees

sim.createOctree sim.insertVoxelsIntoOctree sim.removeVoxelsFromOctree sim.insertObjectIntoOctree sim.subtractObjectFromOctree sim.getOctreeVoxels sim.checkOctreePointOccupancy See also: object parameter functions and parameters related to OC trees.
simCreateOctree simInsertVoxelsIntoOctree simRemoveVoxelsFromOctree simInsertObjectIntoOctree simSubtractObjectFromOctree simGetOctreeVoxels simCheckOctreePointOccupancy

Point clouds

sim.createPointCloud sim.getPointCloudOptions sim.setPointCloudOptions sim.insertPointsIntoPointCloud sim.removePointsFromPointCloud sim.subtractObjectFromPointCloud sim.intersectPointsWithPointCloud sim.insertObjectIntoPointCloud sim.getPointCloudPoints See also: object parameter functions and parameters related to point clouds.
simCreatePointCloud simGetPointCloudOptions simSetPointCloudOptions simInsertPointsIntoPointCloud simRemovePointsFromPointCloud simSubtractObjectFromPointCloud simIntersectPointsWithPointCloud simInsertObjectIntoPointCloud simGetPointCloudPoints

Paths

sim.createPath sim.getConfigDistance sim.getPathLengths sim.getPathInterpolatedConfig sim.resamplePath sim.generateTimeOptimalTrajectory sim.generateShapeFromPath sim.getClosestPosOnPath
simGenerateShapeFromPath simGetClosestPosOnPath

Scene objects

sim.getObject sim.getObjectUid sim.isHandle sim.removeObjects sim.removeModel sim.getObjectAlias sim.setObjectAlias sim.getObjects sim.getObjectsInTree sim.getObjectParent sim.setObjectParent sim.getObjectHierarchyOrder sim.setObjectHierarchyOrder sim.getObjectChild sim.getObjectMatrix sim.setObjectMatrix sim.getObjectPose sim.setObjectPose sim.getObjectPosition sim.setObjectPosition sim.getObjectOrientation sim.setObjectOrientation sim.getObjectQuaternion sim.setObjectQuaternion sim.getObjectType sim.getObjectSel sim.setObjectSel sim.getObjectSizeFactor sim.copyPasteObjects sim.scaleObject sim.scaleObjects sim.getObjectProperty sim.setObjectProperty sim.getObjectSpecialProperty sim.setObjectSpecialProperty sim.getObjectVelocity sim.readCustomTableData sim.writeCustomTableData sim.readCustomStringData sim.writeCustomStringData sim.readCustomBufferData sim.writeCustomBufferData sim.readCustomDataTags sim.setReferencedHandles sim.getReferencedHandles sim.getReferencedHandlesTags sim.isDynamicallyEnabled sim.getObjectColor sim.setObjectColor See also: object parameter functions and parameters related to scene objects.
simGetObject simGetObjectUid simIsHandle simRemoveObjects simRemoveModel simGetObjectAlias simSetObjectAlias simGetObjects simGetObjectsInTree simGetObjectParent simSetObjectParent simGetObjectHierarchyOrder simSetObjectHierarchyOrder simGetObjectChild simGetObjectMatrix simSetObjectMatrix simGetObjectPose simSetObjectPose simGetObjectPosition simSetObjectPosition simGetObjectOrientation simSetObjectOrientation simGetObjectQuaternion simSetObjectQuaternion simGetObjectType simGetObjectSel simSetObjectSel simGetObjectSizeFactor simCopyPasteObjects simScaleObject simScaleObjects simGetObjectProperty simSetObjectProperty simGetObjectSpecialProperty simSetObjectSpecialProperty simGetObjectVelocity simReadCustomDataBlock simReadCustomDataBlockTags simWriteCustomDataBlock simSetReferencedHandles simGetReferencedHandles simIsDynamicallyEnabled simGetObjectColor simSetObjectColor

Object size / scaling

sim.getObjectSizeFactor sim.scaleObject sim.scaleObjects sim.getShapeBB sim.setShapeBB
simGetObjectSizeFactor simScaleObject simScaleObjects

Collections

sim.createCollection sim.destroyCollection sim.addItemToCollection sim.getCollectionObjects
simCreateCollectionEx simDestroyCollection simAddItemToCollection simGetCollectionObjects

Serial port

sim.serialCheck sim.serialClose sim.serialOpen sim.serialRead sim.serialSend
simSerialCheck simSerialClose simSerialOpen simSerialRead simSerialSend

Rendering

sim.addDrawingObject sim.addDrawingObjectItem sim.removeDrawingObject sim.getShapeColor sim.setShapeColor sim.getObjectColor sim.setObjectColor sim.changeEntityColor sim.restoreEntityColor sim.getGenesisEvents
simAddDrawingObject simAddDrawingObjectItem simRemoveDrawingObject simGetShapeColor simSetShapeColor simGetObjectColor simSetObjectColor

Particle objects

sim.addParticleObject sim.addParticleObjectItem sim.removeParticleObject

Models

sim.getModelProperty sim.setModelProperty sim.saveModel sim.loadModel
simGetModelProperty simSetModelProperty simSaveModel simLoadModel

Object selection

sim.getObjectSel sim.setObjectSel
simGetObjectSel simSetObjectSel

Object creation

sim.createDummy sim.createScript sim.createForceSensor sim.createHeightfieldShape sim.createJoint sim.createShape sim.createProximitySensor sim.createPrimitiveShape sim.createVisionSensor sim.createOctree sim.createPointCloud sim.createTexture sim.generateTextShape sim.generateShapeFromPath
simCreateDummy simCreateScript simCreateForceSensor simCreateHeightfieldShape simCreateJoint simCreateShape simCreateProximitySensor simCreatePrimitiveShape simCreateVisionSensor simCreateOctree simCreatePointCloud simCreateTexture simGenerateShapeFromPath

Simulation

sim.startSimulation sim.pauseSimulation sim.stopSimulation sim.getSimulationState sim.getSimulationTime sim.getSimulationTimeStep sim.getRealTimeSimulation
simStartSimulation simPauseSimulation simStopSimulation simGetSimulationState simGetSimulationTime simGetSimulationTimeStep simGetRealTimeSimulation

Threads

sim.setStepping sim.step sim.setAutoYieldDelay sim.acquireLock sim.releaseLock sim.getSimulationStopping sim.handleExtCalls

Custom scripts

sim.registerScriptFuncHook
simRegisterScriptCallbackFunction simRegisterScriptVariable simRegisterScriptFuncHook

Transformations

sim.buildMatrix sim.buildPose sim.getEulerAnglesFromMatrix sim.matrixToPose sim.poseToMatrix sim.multiplyMatrices sim.multiplyPoses sim.interpolateMatrices sim.interpolatePoses sim.getMatrixInverse sim.getPoseInverse sim.getObjectMatrix sim.setObjectMatrix sim.getObjectPose sim.setObjectPose sim.getObjectPosition sim.setObjectPosition sim.getObjectOrientation sim.setObjectOrientation sim.getObjectQuaternion sim.setObjectQuaternion sim.getObjectChildPose sim.setObjectChildPose sim.multiplyVector sim.getRotationAxis sim.rotateAroundAxis sim.getObjectVelocity sim.alignShapeBB sim.relocateShapeFrame sim.alphaBetaGammaToYawPitchRoll sim.yawPitchRollToAlphaBetaGamma See also: packing/unpacking functions
simBuildMatrix simBuildPose simGetEulerAnglesFromMatrix simMatrixToPose simPoseToMatrix simMultiplyMatrices simMultiplyPoses simInterpolateMatrices simInterpolatePoses simInvertMatrix simInvertPose simGetObjectMatrix simSetObjectMatrix simGetObjectPose simSetObjectPose simGetObjectPosition simSetObjectPosition simGetObjectOrientation simSetObjectOrientation simGetObjectQuaternion simSetObjectQuaternion simGetObjectChildPose simSetObjectChildPose simTransformVector simGetRotationAxis simRotateAroundAxis simGetObjectVelocity simAlignShapeBB simRelocateShapeFrame

Messaging

loadPlugin unloadPlugin sim.addLog sim.getSimulatorMessage sim.serialCheck sim.serialClose sim.serialOpen sim.serialRead sim.serialSend sim.setInt32Signal sim.getInt32Signal sim.clearInt32Signal sim.setFloatSignal sim.getFloatSignal sim.clearFloatSignal sim.setStringSignal sim.getStringSignal sim.clearStringSignal sim.setBufferSignal sim.getBufferSignal sim.clearBufferSignal sim.getSignalName sim.waitForSignal sim.auxiliaryConsoleClose sim.auxiliaryConsoleOpen sim.auxiliaryConsolePrint sim.persistentDataRead sim.persistentDataWrite sim.getPersistentDataTags sim.getMatchingPersistentDataTags sim.callScriptFunction sim.getScriptFunctions sim.executeScriptString sim.getObjectUid sim.getGenesisEvents sim.broadcastMsg sim.pushUserEvent
simAddLog simSetLastError simGetSimulatorMessage simSerialCheck simSerialClose simSerialOpen simSerialRead simSerialSend simSetInt32Signal simGetInt32Signal simClearInt32Signal simSetFloatSignal simGetFloatSignal simClearFloatSignal simSetStringSignal simGetStringSignal simClearStringSignal simGetSignalName simAuxiliaryConsoleClose simAuxiliaryConsoleOpen simAuxiliaryConsolePrint simPersistentDataRead simPersistentDataWrite simGetPersistentDataTags simCallScriptFunctionEx simExecuteScriptString simGetObjectUid

Signals

sim.setInt32Signal sim.getInt32Signal sim.clearInt32Signal sim.setFloatSignal sim.getFloatSignal sim.clearFloatSignal sim.setStringSignal sim.getStringSignal sim.clearStringSignal sim.setBufferSignal sim.getBufferSignal sim.clearBufferSignal sim.getSignalName sim.waitForSignal See also: data packing/unpacking. persistent data.
simSetInt32Signal simGetInt32Signal simClearInt32Signal simSetFloatSignal simGetFloatSignal simClearFloatSignal simSetStringSignal simGetStringSignal simClearStringSignal simGetSignalName

Persistent Data

sim.persistentDataRead sim.persistentDataWrite sim.getPersistentDataTags sim.getMatchingPersistentDataTags
simPersistentDataRead simPersistentDataWrite simGetPersistentDataTags

Custom data

sim.readCustomTableData sim.writeCustomTableData sim.readCustomStringData sim.writeCustomStringData sim.readCustomBufferData sim.writeCustomBufferData sim.readCustomDataTags See also: data packing/unpacking.
simReadCustomDataBlock simReadCustomDataBlockTags simWriteCustomDataBlock

Textures

sim.getTextureId sim.getShapeTextureId sim.readTexture sim.saveImage sim.loadImage sim.getScaledImage sim.transformImage sim.writeTexture sim.createTexture sim.setShapeTexture
simApplyTexture simGetTextureId simGetShapeTextureId simReadTexture simSaveImage simLoadImage simGetScaledImage simTransformImage simWriteTexture simCreateTexture simSetShapeTexture

Blocking functions

sim.wait sim.waitForSignal sim.moveToConfig sim.moveToPose sim.serialRead

Auxiliary consoles

sim.auxiliaryConsoleClose sim.auxiliaryConsoleOpen sim.auxiliaryConsolePrint sim.auxiliaryConsoleShow See also: Custom user interfaces.
simAuxiliaryConsoleClose simAuxiliaryConsoleOpen simAuxiliaryConsolePrint simAuxiliaryConsoleShow

Text/code editors

sim.textEditorClose sim.textEditorGetInfo sim.textEditorOpen sim.textEditorShow See also: Custom user interfaces.

Import/export

sim.importShape sim.importMesh sim.exportMesh sim.createTexture sim.loadImage sim.saveImage sim.generateTextShape See also: Assimp plugin API reference.
simImportShape simImportMesh simExportMesh simCreateTexture simLoadImage simSaveImage

Pages and views

sim.floatingViewAdd sim.floatingViewRemove sim.adjustView sim.cameraFitToView
simFloatingViewAdd simFloatingViewRemove simAdjustView simCameraFitToView

Motion functionality

sim.moveToConfig sim.moveToConfig_init sim.moveToConfig_step sim.moveToConfig_cleanup sim.moveToPose sim.moveToPose_init sim.moveToPose_step sim.moveToPose_cleanup sim.ruckigPos sim.ruckigVel sim.ruckigStep sim.ruckigRemove
simRuckigPos simRuckigVel simRuckigStep simRuckigRemove

Packing / unpacking

sim.packTable sim.unpackTable sim.packUInt8Table sim.unpackUInt8Table sim.packUInt16Table sim.unpackUInt16Table sim.packUInt32Table sim.unpackUInt32Table sim.packInt32Table sim.unpackInt32Table sim.packFloatTable sim.unpackFloatTable sim.packDoubleTable sim.unpackDoubleTable sim.copyTable sim.transformBuffer
simPackTable simUnpackTable

Stacks

sim.packTable sim.unpackTable
simCreateStack simReleaseStack simCopyStack simPushNullOntoStack simPushBoolOntoStack simPushInt32OntoStack simPushInt64OntoStack simPushFloatOntoStack simPushDoubleOntoStack simPushTextOntoStack simPushStringOntoStack simPushBufferOntoStack simPushUInt8TableOntoStack simPushInt32TableOntoStack simPushInt64TableOntoStack simPushFloatTableOntoStack simPushDoubleTableOntoStack simPushTableOntoStack simInsertDataIntoStackTable simGetStackSize simPopStackItem simGetStackItemType simGetStackStringType simMoveStackItemToTop simGetStackBoolValue simGetStackInt32Value simGetStackInt64Value simGetStackFloatValue simGetStackDoubleValue simGetStackStringValue simGetStackTableInfo simGetStackUInt8Table simGetStackInt32Table simGetStackInt64Table simGetStackFloatTable simGetStackDoubleTable simUnfoldStackTable simDebugStack simPackTable simUnpackTable

Object parameters

sim.getObjectInt32Param sim.setObjectInt32Param sim.getObjectFloatParam sim.setObjectFloatParam sim.getObjectStringParam sim.setObjectStringParam sim.getObjectFloatArrayParam sim.setObjectFloatArrayParam
simGetObjectInt32Param simSetObjectInt32Param simGetObjectFloatParam simSetObjectFloatParam simGetObjectStringParam simSetObjectStringParam simGetObjectFloatArrayParam simSetObjectFloatArrayParam

Simulator parameters

sim.setArrayParam sim.getArrayParam sim.setBoolParam sim.getBoolParam sim.setInt32Param sim.getInt32Param sim.setFloatParam sim.getFloatParam sim.setStringParam sim.getStringParam sim.setNamedStringParam sim.getNamedStringParam
simSetArrayParam simGetArrayParam simSetBoolParam simGetBoolParam simSetInt32Param simGetInt32Param simSetFloatParam simGetFloatParam simSetStringParam simGetStringParam simSetNamedStringParam simGetNamedStringParam simGetUInt64Parameter

Simulator named parameters

sim.setNamedStringParam sim.getNamedStringParam sim.getNamedBoolParam sim.getNamedFloatParam sim.getNamedInt32Param
simSetNamedStringParam simGetNamedStringParam

Physics engine parameters

sim.getEngineFloatParam sim.getEngineInt32Param sim.getEngineBoolParam sim.setEngineFloatParam sim.setEngineInt32Param sim.setEngineBoolParam
simGetEngineFloatParam simGetEngineInt32Param simGetEngineBoolParam simSetEngineFloatParam simSetEngineInt32Param simSetEngineBoolParam

Other commands

sim.addLog sim.announceSceneContentChange sim.getNavigationMode sim.setNavigationMode sim.getPage sim.setPage sim.getLastInfo sim.getPluginName sim.getPluginInfo sim.setPluginInfo sim.getNavigationMode sim.getSystemTime sim.refreshDialogs sim.setAutoYieldDelay sim.step sim.getExplicitHandling sim.setExplicitHandling sim.launchExecutable sim.quitSimulator sim.getExtensionString sim.textEditorClose sim.textEditorGetInfo sim.textEditorOpen sim.textEditorShow sim.getUserVariables sim.moduleEntry sim.getGenesisEvents sim.pushUserEvent
simAddLog simAnnounceSceneContentChange simGetNavigationMode simSetNavigationMode simGetPage simSetPage simGetLastInfo simGetLastError simSetLastError simGetPluginName simGetPluginInfo simSetPluginInfo simGetNavigationMode simRefreshDialogs simGetExplicitHandling simSetExplicitHandling simQuitSimulator simGetExtensionString simOpenTextEditor simCreateBuffer simReleaseBuffer simModuleEntry