B0-based remote API, Python

simxAddDrawingObject_cubes

Description Displays cubes in the scene
synopsis list simxAddDrawingObject_cubes(number size, list color, list coords, string topic)
Parameters
size: The size of the cubes
color: The RGB color of the cubes (0-255). Specify negative values for emissive color
coords: The coordinates for the cubes to display (3 per cube)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created drawing object
See also
Other languages

simxAddDrawingObject_points

Description Displays points in the scene
synopsis list simxAddDrawingObject_points(number size, list color, list coords, string topic)
Parameters
size: The pixel size of the points
color: The RGB color of the points (0-255). Specify negative values for emissive color
coords: The coordinates for the points to display (3 per point)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created drawing object
See also
Other languages

simxAddDrawingObject_segments

Description Displays line segments in the scene
synopsis list simxAddDrawingObject_segments(number lineSize, list color, list segments, string topic)
Parameters
lineSize: The size of the segments, in pixels
color: The RGB color of the cubes (0-255). Specify negative values for emissive color
segments: The coordinates for the segments to display (6 per segment)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created drawing object
See also
Other languages

simxAddDrawingObject_spheres

Description Displays spheres in the scene
synopsis list simxAddDrawingObject_spheres(number size, list color, list coords, string topic)
Parameters
size: The size of the spheres
color: The RGB color of the spheres (0-255). Specify negative values for emissive color
coords: The coordinates for the spheres to display (3 per sphere)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created drawing object
See also
Other languages

simxAddDrawingObject_triangles

Description Displays triangles in the scene
synopsis list simxAddDrawingObject_triangles(list color, list triangles, string topic)
Parameters
color: The RGB color of the triangles (0-255). Specify negative values for emissive color
triangles: The coordinates for the triangles to display (9 per triangle)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created drawing object
See also
Other languages

simxAddStatusbarMessage

Description Adds a message to the status bar
synopsis list simxAddStatusbarMessage(string msg, string topic)
Parameters
msg: The message to display
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
sim.addLog (regular API)
Other languages

simxAuxiliaryConsoleClose

Description Closes an auxiliary console window
synopsis list simxAuxiliaryConsoleClose(number consoleHandle, string topic)
Parameters
consoleHandle: The handle of the console window
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the console doesn't exist (anymore), 1 if the console window was closed
See also
Other languages

simxAuxiliaryConsoleOpen

Description Opens an auxiliary console window for text display
synopsis list simxAuxiliaryConsoleOpen(string title, number maxLines, number mode, list position, list size, list textColor, list backgroundColor, string topic)
Parameters
title: The title of the console window
maxLines: The number of text lines that can be displayed and buffered
mode: bit-coded value. Bit0 set indicates that the console window will automatically close at simulation end, bit1 set indicates that lines will be wrapped, bit2 set indicates that the user can close the console window, bit3 set indicates that the console will automatically be hidden during simulation pause, bit4 set indicates that the console will not automatically hide when the user switches to another scene
position: The initial position of the console window (x and y value)
size: The initial size of the console window (x and y value)
textColor: The color of the text (rgb values, 0-255)
backgroundColor: The background color of the window (rgb values, 0-255)
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created console window
See also
Other languages

simxAuxiliaryConsolePrint

Description Prints to an auxiliary console window
synopsis list simxAuxiliaryConsolePrint(number consoleHandle, string text, string topic)
Parameters
consoleHandle: The handle of the console window
text: The text to append, or the empty string to clear the console window
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the console doesn't exist (anymore), 1 if the operation was successful
See also
Other languages

simxAuxiliaryConsoleShow

Description Shows or hides an auxiliary console window
synopsis list simxAuxiliaryConsoleShow(number consoleHandle, bool showState, string topic)
Parameters
consoleHandle: The handle of the console window
showState: The show state of the console window
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the console doesn't exist (anymore), 1 if the console window's show state was changed
See also
Other languages

simxBreakForceSensor

Description Allows breaking a force sensor during simulation. A broken force sensor will lose its positional and orientational constraints
synopsis list simxBreakForceSensor(number handle, string topic)
Parameters
handle: The handle of the force sensor
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxCallScriptFunction

Description Calls a script function inside of CoppeliaSim (i.e. server side)
synopsis list simxCallScriptFunction(string funcAtObjName, number/string scriptType, anyType funcArgs, string topic)
Parameters
funcAtObjName: A string representing the function name and script name, e.g. myFunctionName@theScriptName. When the script is not associated with an object, then just specify the function name
scriptType: The type of the script (specified as number or string). E.g. "sim.scripttype_mainscript" is a valid string argument that will be evaluated on the server side. See also simxEvaluateToInt
funcArgs: The function argument(s). Group several arguments inside of a list
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (?): The first return value of the called function
item3 (?): The second return value of the called function
item4 (?): etc.
See also
sim.callScriptFunction (regular API)
Other languages

simxCheckCollision

Description Checks whether two collidable entities are colliding
synopsis list simxCheckCollision(number entity1, number/string entity2, string topic)
Parameters
entity1: The handle of the first entity
entity2: The handle of the second entity. Can also be the "sim.handle_all" string, to check entity1 against all other collidable objects. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The collision state of the object
See also
Other languages

simxCheckDistance

Description Computes the minimum distance between two measurable entities
synopsis list simxCheckDistance(number entity1, number/string entity2, number threshold, string topic)
Parameters
entity1: The handle of the first entity
entity2: The handle of the second entity. Can also be the "sim.handle_all" string, to check entity1 against all other measurable objects. See also simxEvaluateToInt
threshold: If distance is bigger than the threshold, the distance is not calculated. If threshold is 0 or negative, then no threshold is used
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 is distance is larger than the threshold, 1 otherwise
item3 (number): The minimum distance
item4 (list): The first point of the minimum distance segment
item5 (list): The second point of the minimum distance segment
See also
Other languages

simxCheckProximitySensor

Description Computes the detection state of a proximity sensor, for a specific detectable entity
synopsis list simxCheckProximitySensor(number handle, number/string entity, string topic)
Parameters
handle: The handle of the proximity sensor
entity: The handle of the entity to detect. Can also be the "sim.handle_all" string, to check all detectable entities. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): detection state (0 or 1)
item3 (number): The distance to the detected point
item4 (list): The detected point relative to the sensor frame
See also
Other languages

simxCheckVisionSensor

Description Computes the detection state of a vision sensor, for a specific renderable entity
synopsis list simxCheckVisionSensor(number handle, number/string entity, string topic)
Parameters
handle: The handle of the vision sensor
entity: The handle of the entity to detect. Can also be the "sim.handle_all" string, to check all renderable entities. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): detection state (0 or 1)
item3 (number): The distance to the detected point
item4 (list): The detected point relative to the sensor frame
See also
Other languages

simxClearFloatSignal

Description Clears a float signal (removes it)
synopsis list simxClearFloatSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxClearIntegerSignal

Description Clears an int signal (removes it)
synopsis list simxClearIntegerSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxClearStringSignal

Description Clears a string signal (removes it)
synopsis list simxClearStringSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxCloseScene

Description Closes current scene, and switches to another open scene
synopsis list simxCloseScene(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
sim.closeScene (regular API)
Other languages

simxCopyPasteObjects

Description Duplicates objects
synopsis list simxCopyPasteObjects(list objectHandles, number options, string topic)
Parameters
objectHandles: The handles of the objects to copy and paste
options: Bit-coded. If bit0 is set (i.e. 1), then whole models will be copied
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): handles of the duplicates
See also
Other languages

simxCreateDummy

Description Creates a dummy object in the scene
synopsis list simxCreateDummy(number size, list color, string topic)
Parameters
size: The size of the dummy
color: The RGB color of the dummy (0-255). Specify negative values for emissive color
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the created dummy
See also
Other languages

simxCreatePublisher

Description Creates a custom publisher topic, and returns it
synopsis string simxCreatePublisher(bool dropMessages = False)
Parameters
dropMessages: Whether some messages will be dropped if a queue is forming. In that case, the freshest messages will be retained
return
The topic of the created publisher
See also
Other languages

simxCreateSubscriber

Description Creates a custom subscriber topic, and returns it
synopsis string simxCreateSubscriber(callback callBackFunc, number publishInterval = 1, bool dropMessages = False)
Parameters
callBackFunc: The callback function for the subscriber
publishInterval: The rate (in terms of simulation loops) at which the server (i.e. CoppeliaSim) should publish the message
dropMessages: Whether some messages will be dropped if a queue is forming. In that case, the freshest message will be retained
return
The default subscriber topic
See also
Other languages

simxDefaultPublisher

Description Returns the topic for the default publisher
synopsis string simxDefaultPublisher()
Parameters
return
The default publisher topic
See also
Other languages

simxDefaultSubscriber

Description Returns the topic for the default subscriber
synopsis string simxDefaultSubscriber(callback callBackFunc, number publishInterval = 1)
Parameters
callBackFunc: The callback function for the subscriber
publishInterval: The rate (in terms of simulation loops) at which the server (i.e. CoppeliaSim) should publish the message
return
The default subscriber topic
See also
Other languages

simxDisplayDialog

Description Displays a generic dialog box
synopsis list simxDisplayDialog(string titleText, string mainText, number/string dialogType, string inputText, string topic)
Parameters
titleText: The title bar text
mainText: The information text
dialogType: The generic dialog style. Can also be a string value, e.g. "sim.dlgstyle_message". See also simxEvaluateToInt
inputText: The initial text in the edit box if the dialog is an input dialog
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the dialog
See also
Other languages

simxEndDialog

Description Closes and releases resource from a previous call to simxDisplayDialog. Even if the dialog is not visible anymore, you should release resources by using this function
synopsis list simxEndDialog(number handle, string topic)
Parameters
handle: The handle of the generic dialog
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxEvaluateToInt

Description Evaluates a Lua expression to an integer, on the server side, e.g. sim.object_proximitysensor_type would evaluate to 5, 25+42 would evaluate to 67
synopsis list simxEvaluateToInt(string str, string topic)
Parameters
str: The Lua expression to evaluate
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): the integer value of the evaluated Lua expression
See also
Other languages

simxEvaluateToStr

Description Evaluates a Lua expression to a string, on the server side, e.g. string.gsub("Hello World", "World", "Paul") would evaluate to Hello Paul
synopsis list simxEvaluateToStr(string str, string topic)
Parameters
str: The Lua expression to evaluate
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): the string value of the evaluated Lua expression
See also
Other languages

simxExecuteScriptString

Description Executes a Lua string (i.e. runs the code)
synopsis list simxExecuteScriptString(string code, string topic)
Parameters
code: The string to execute
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (?): The first return value of the executed string
item3 (?): The second return value of the executed string
item4 (?): etc.
See also
Other languages

simxGetArrayParameter

Description Retrieves a array parameter
synopsis list simxGetArrayParameter(number/string paramId, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.arrayparam_gravity". See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The value of the parameter
See also
Other languages

simxGetBoolParameter

Description Retrieves a boolean parameter
synopsis list simxGetBoolParameter(number/string paramId, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.boolparam_proximity_sensor_handling_enabled". See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The value of the parameter
See also
Other languages

simxGetCollectionHandle

Description Retrieves the handle of a collection
synopsis list simxGetCollectionHandle(string collectionName, string topic)
Parameters
collectionName: Name of the collection. If the name is appended by a "@silentError" suffix, then no error will be output if the collection does not exist
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the collection
See also
Other languages

simxGetCollisionHandle

Description Retrieves the handle of a collision object
synopsis list simxGetCollisionHandle(string nameOfObject, string topic)
Parameters
nameOfObject: The name of the collision object. If the name is appended by a "@silentError" suffix, then no error will be output if the collision object does not exist
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the collision object
See also
Other languages

simxGetDialogInput

Description Queries the input of a generic dialog box
synopsis list simxGetDialogInput(number handle, string topic)
Parameters
handle: The handle of the generic dialog
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): The input text
See also
Other languages

simxGetDialogResult

Description Queries the result of a generic dialog box
synopsis list simxGetDialogResult(number handle, string topic)
Parameters
handle: The handle of the generic dialog
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): The result of the dialog, as a string
See also
Other languages

simxGetDistanceHandle

Description Retrieves the handle of a distance calculation object
synopsis list simxGetDistanceHandle(string nameOfObject, string topic)
Parameters
nameOfObject: The name of the distance calculation object. If the name is appended by a "@silentError" suffix, then no error will be output if the distance object does not exist
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the distance calculation object
See also
Other languages

simxGetFloatParameter

Description Retrieves a float parameter
synopsis list simxGetFloatParameter(number/string paramId, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.floatparam_simulation_time_step". See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The value of the parameter
See also
Other languages

simxGetFloatSignal

Description Retrieves a float signal
synopsis list simxGetFloatSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The value of the signal, or nil if the signal does not exist
See also
Other languages

simxGetIntParameter

Description Retrieves an integer parameter
synopsis list simxGetIntParameter(number/string paramId, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.intparam_program_version". See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The value of the parameter
See also
Other languages

simxGetIntSignal

Description Retrieves an int signal
synopsis list simxGetIntSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The value of the signal, or nil if the signal does not exist
See also
Other languages

simxGetJointForce

Description Retrieves the force or torque applied to a joint along/about its active axis
synopsis list simxGetJointForce(number jointHandle, string topic)
Parameters
jointHandle: The handle of the joint
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The force or the torque applied to the joint along/about its z-axis, or nil if no value is available yet
See also
Other languages

simxGetJointMaxForce

Description Retrieves the maximum force or torque that a joint can exert
synopsis list simxGetJointMaxForce(number jointHandle, string topic)
Parameters
jointHandle: The handle of the joint
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The maximum force or torque that the joint can exert
See also
Other languages

simxGetJointPosition

Description Retrieves the intrinsic position of a joint
synopsis list simxGetJointPosition(number jointHandle, string topic)
Parameters
jointHandle: The handle of the joint
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The position of the joint, in radians or meters
See also
Other languages

simxGetJointTargetPosition

Description Retrieves the target position of a joint
synopsis list simxGetJointTargetPosition(number jointHandle, string topic)
Parameters
jointHandle: The handle of the joint
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The target position of the joint, in radians or meters
See also
Other languages

simxGetJointTargetVelocity

Description Retrieves the target velocity of a joint
synopsis list simxGetJointTargetVelocity(number jointHandle, string topic)
Parameters
jointHandle: The handle of the joint
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The target velocity of the joint, in radians/s or meters/s
See also
Other languages

simxGetObjectChild

Description Retrieves the handle of an object's child object
synopsis list simxGetObjectChild(number objectHandle, number index, string topic)
Parameters
objectHandle: The handle of the object
index: The zero-based index of the child's position. To retrieve all children of an object, call the function by increasing the index until the return value is -1
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the child, or -1 if there is no child at the given index position
See also
Other languages

simxGetObjectFloatParameter

Description Retrieves a floating point parameter of an object
synopsis list simxGetObjectFloatParameter(number objectHandle, number/string parameterID, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to retrieve, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The retrieved parameter
See also
Other languages

simxGetObjectHandle

Description Retrieves the handle of an object
synopsis list simxGetObjectHandle(string objectName, string topic)
Parameters
objectName: Name of object. If the name is appended by a "@alt" suffix, then the object handle based on the object's alternative name will be retrieved. If the name is appended by a "@silentError" suffix, then no error will be output if the object does not exist
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the object
See also
Other languages

simxGetObjectIntParameter

Description Retrieves an integer parameter of an object
synopsis list simxGetObjectIntParameter(number objectHandle, number/string parameterID, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to retrieve, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The retrieved parameter
See also
Other languages

simxGetObjectMatrix

Description Retrieves the transformation matrix of an object
synopsis list simxGetObjectMatrix(number objectHandle, number/string relObjHandle, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the matrix. Specify -1 to retrieve the absolute matrix, "sim.handle_parent" to retrieve the matrix relative to the object's parent, or an object handle relative to whose reference frame you want the matrix. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The (Xx,Yx,Zx,Px,Xy,Yy,Zy,Py,Xz,Yz,Zz,Pz) transformation matrix of the object
See also
Other languages

simxGetObjectName

Description Retrieves the name or alternative name of an object
synopsis list simxGetObjectName(number objectHandle, bool altName, string topic)
Parameters
objectHandle: Handle of the object
altName: Value indicating whether the regular or alternative name should be retrieved
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): The name or alternative name of the object
See also
sim.getObjectName (regular API)
Other languages

simxGetObjectOrientation

Description Retrieves the Euler angles orientation of an object
synopsis list simxGetObjectOrientation(number objectHandle, number/string relObjHandle, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the orientation. Specify -1 to retrieve the absolute orientation, "sim.handle_parent" to retrieve the orientation relative to the object's parent, or an object handle relative to whose reference frame you want the orientation. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The (alpha,beta,gamma) Euler angles of the object
See also
Other languages

simxGetObjectParent

Description Retrieves the handle of an object's parent object
synopsis list simxGetObjectParent(number objectHandle, string topic)
Parameters
objectHandle: The handle of the object
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the parent, or -1 if the object has no parent
See also
Other languages

simxGetObjectPose

Description Retrieves the position and quaternion of an object
synopsis list simxGetObjectPose(number objectHandle, number/string relObjHandle, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the pose. Specify -1 to retrieve the absolute pose, "sim.handle_parent" to retrieve the pose relative to the object's parent, or an object handle relative to whose reference frame you want the pose. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The (X,Y,Z,Qx,Qy,Qz,Qw) pose of the object
See also
Other languages

simxGetObjectPosition

Description Retrieves the position of an object
synopsis list simxGetObjectPosition(number objectHandle, number/string relObjHandle, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the position. Specify -1 to retrieve the absolute position, "sim.handle_parent" to retrieve the position relative to the object's parent, or an object handle relative to whose reference frame you want the position. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The (X,Y,Z) position of the object
See also
Other languages

simxGetObjectQuaternion

Description Retrieves the quaternion orientation of an object
synopsis list simxGetObjectQuaternion(number objectHandle, number/string relObjHandle, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the orientation. Specify -1 to retrieve the absolute orientation, "sim.handle_parent" to retrieve the orientation relative to the object's parent, or an object handle relative to whose reference frame you want the orientation. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The (Qx,Qy,Qz,Qw) quaternion of the object
See also
Other languages

simxGetObjectSelection

Description Retrieves all selected object handles
synopsis list simxGetObjectSelection(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The handles of the selected objects
See also
Other languages

simxGetObjectStringParameter

Description Retrieves a string parameter of an object
synopsis list simxGetObjectStringParameter(number objectHandle, number/string parameterID, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to retrieve, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): The retrieved parameter
See also
Other languages

simxGetObjectVelocity

Description Reads the linear and angular velocity of an object. The velocity is a measured velocity (i.e. from one simulation step to the next)
synopsis list simxGetObjectVelocity(number handle, string topic)
Parameters
handle: The handle of the object
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The linear velocity
item3 (list): The angular velocity vector, i.e. its direction represents the rotation axis, its length the rotation velocity
See also
sim.getObjectVelocity (regular API)
Other languages

simxGetObjects

Description Retrieves object handles from the scene
synopsis list simxGetObjects(number/string objectType, string topic)
Parameters
objectType: The object type, or "sim.handle_all" to retrieve all object handles in the scene. See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The object handles
See also
Other languages

simxGetObjectsInTree

Description Retrieves object handles in a given hierarchy tree
synopsis list simxGetObjectsInTree(number/string treeBaseHandle, string objectType, number options, string topic)
Parameters
treeBaseHandle: The handle of the object that describes the hierarchy tree, or the string "sim.handle_scene" for all objects in the scene. See also simxEvaluateToInt
objectType: The object type to retrieve, or 'sim.handle_all' for any type of object in the tree
options: Bit-coded. bit0 set (1): exclude the tree base from the returned array, bit1 set (2): include in the returned array only the object's first children. If treeBaseHandle is 'sim.handle_scene', then only parentless objects will be included
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The object handles
See also
Other languages

simxGetServerTimeInMs

Description Retrieves the current server time, in milliseconds
synopsis list simxGetServerTimeInMs(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The server time. On Windows is equivalent to the TimeGetTime() function, on Linux it is equivalent to the gettimeofday() function.
See also
Other languages

simxGetSimulationState

Description Retrieves the state of the simulation
synopsis list simxGetSimulationState(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The simulation state: 0=stopped, 8=paused, 16=running
See also
Other languages

simxGetSimulationStepDone

Description Checks whether the current simulation step finished executing
synopsis simxGetSimulationStepDone(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call. Recommended is simxDefaultSubscriber
return
See also
Other languages

simxGetSimulationStepStarted

Description Checks whether the current simulation step finished executing
synopsis simxGetSimulationStepStarted(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call. Recommended is simxDefaultSubscriber
return
See also
Other languages

simxGetSimulationTime

Description Retrieves the current simulation time
synopsis list simxGetSimulationTime(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The simulation time in seconds
See also
Other languages

simxGetSimulationTimeStep

Description Retrieves the current simulation time step
synopsis list simxGetSimulationTimeStep(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The simulation time step in seconds
See also
Other languages

simxGetStringParameter

Description Retrieves a string parameter
synopsis list simxGetStringParameter(number/string paramId, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.stringparam_scene_name". See also simxEvaluateToInt
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (string): The value of the parameter
See also
Other languages

simxGetStringSignal

Description Retrieves a string signal. Such a signal represents a byte buffer
synopsis list simxGetStringSignal(string sigName, string topic)
Parameters
sigName: The name of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (byteArray): The value of the signal, or nil if the signal does not exist
See also
Other languages

simxGetTimeInMs

Description Returns the system time in milliseconds
synopsis number simxGetTimeInMs()
Parameters
return
The time in milliseconds
See also
Other languages

simxGetVisionSensorDepthBuffer

Description Retrieves the depth buffer of a vision sensor
synopsis list simxGetVisionSensorDepthBuffer(number objectHandle, bool toMeters, bool asByteArray, string topic)
Parameters
objectHandle: The handle of the vision sensor
toMeters: Whether depth values are expressed in terms of relative distance to the sensor's clipping planes or whether depth values are expressed in terms of distance in meters
asByteArray: If true, then a byte array will be returned, instead of a float array, which is much faster (large float arrays might be very slow to handle with message pack, in several languages). In that case, the user is in charge of correctly decoding the byte array containing 4-byte floats, including little/big Endian conversions, etc.
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The resolution of the depth buffer
item3 (list): The depth buffer. Values are in the range of 0-1 (0=on the near clipping plane, 1=on the far clipping plane). If toMeters was specified, then values represent the distance from the sensor's origin, in meters
See also
Other languages

simxGetVisionSensorImage

Description Retrieves the image of a vision sensor
synopsis list simxGetVisionSensorImage(number objectHandle, bool greyScale, string topic)
Parameters
objectHandle: The handle of the vision sensor
greyScale: Whether the image should be grey scale or color
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (list): The resolution of the image
item3 (byteArray): The image. In a grey scale image, each pixel is represented by one byte, with a color image, each pixel is represented by a RGB-byte-triplet
See also
Other languages

simxLoadModelFromBuffer

Description Loads a model from a buffer
synopsis list simxLoadModelFromBuffer(byteArray buffer, string topic)
Parameters
buffer: The buffer representing the model to load
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the model base object
See also
Other languages

simxLoadModelFromFile

Description Loads a model from file
synopsis list simxLoadModelFromFile(string filename, string topic)
Parameters
filename: The location of the model file. The filename extension is required
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The handle of the model base object
See also
Other languages

simxLoadScene

Description Loads a scene from file
synopsis list simxLoadScene(string filename, string topic)
Parameters
filename: The location of the scene file. The filename extension is required
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 if operation was not successful
See also
Other languages

simxPauseSimulation

Description Requests a pause of the running simulation
synopsis list simxPauseSimulation(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the operation could not be performed. >0 in case of success
See also
Other languages

simxReadCollision

Description Reads the collision state of a collision object
synopsis list simxReadCollision(number handle, string topic)
Parameters
handle: The handle of the collision object
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The collision state of the object
item3 (list): handles of the colliding objects
See also
Other languages

simxReadDistance

Description Reads the distance state of a distance calculation object
synopsis list simxReadDistance(number handle, string topic)
Parameters
handle: The handle of the distance calculation object
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if distance was not yet computed, 1 otherwise
item3 (number): The smallest distance
See also
Other languages

simxReadForceSensor

Description Reads the force and torque applied to a force sensor (filtered values are read), and its current state ('unbroken' or 'broken')
synopsis list simxReadForceSensor(number handle, string topic)
Parameters
handle: The handle of the force sensor
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The sensor state (bit coded: bit0 set=force/torque data is valid, bit1 set=force sensor is broken)
item3 (list): The applied force
item4 (list): The applied torque
See also
Other languages

simxReadProximitySensor

Description Reads the calculation result of a proximity sensor
synopsis list simxReadProximitySensor(number handle, string topic)
Parameters
handle: The handle of the proximity sensor
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): detection state (0 or 1)
item3 (number): The distance to the detected point
item4 (list): The detected point relative to the sensor frame
item5 (number): The detected object handle
item6 (list): The normal vector of the detected surface, relative to the sensor frame
See also
Other languages

simxReadVisionSensor

Description Reads the state of a vision sensor
synopsis list simxReadVisionSensor(number handle, string topic)
Parameters
handle: The handle of the vision sensor
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): detection state (0 or 1)
item3 (list): The default auxiliary value packet. See [L[regularApi/simReadVisionSensor.htm,here] for details
item4 (list): Additional auxiliary value packet (e.g. from an image processing component)
item5 (list): Etc.
See also
Other languages

simxRemoveDrawingObject

Description Removes a drawing object from the scene
synopsis list simxRemoveDrawingObject(number handle, string topic)
Parameters
handle: The drawing object handle to remove
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxRemoveObjects

Description Removes objects or models
synopsis list simxRemoveObjects(list objectHandles, number options, string topic)
Parameters
objectHandles: The handles of the objects/models to remove
options: Bit-coded. If bit0 is set (i.e. 1), then whole models will be removed. If bit1 is set (i.e. 2), then all objects and models will be removed
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): The number of removed objects
See also
sim.removeObject (regular API)
sim.removeModel (regular API)
Other languages

simxRemovePublisher

Description Removes or disables a custom publisher
synopsis simxRemovePublisher(string topic)
Parameters
topic: The topic of the publisher
return
See also
Other languages

simxRemoveSubscriber

Description Removes or disables a subscriber
synopsis simxRemoveSubscriber(string topic)
Parameters
topic: The topic of the subscriber
return
See also
Other languages

simxServiceCall

Description Returns the topic for service calls
synopsis string simxServiceCall()
Parameters
return
The service call topic
See also
Other languages

simxSetArrayParameter

Description Sets a float parameter
synopsis list simxSetArrayParameter(number/string paramId, list paramVal, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.arrayparam_gravity". See also simxEvaluateToInt
paramVal: The value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetBoolParameter

Description Sets a boolean parameter
synopsis list simxSetBoolParameter(number/string paramId, bool paramVal, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.boolparam_proximity_sensor_handling_enabled". See also simxEvaluateToInt
paramVal: The value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetFloatParameter

Description Sets a float parameter
synopsis list simxSetFloatParameter(number/string paramId, number paramVal, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.floatparam_simulation_time_step". See also simxEvaluateToInt
paramVal: The value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetFloatSignal

Description Sets a float signal
synopsis list simxSetFloatSignal(string sigName, number sigValue, string topic)
Parameters
sigName: The name of the signal
sigValue: The value of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetIntParameter

Description Sets an integer parameter
synopsis list simxSetIntParameter(number/string paramId, number paramVal, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.intparam_program_version". See also simxEvaluateToInt
paramVal: The value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetIntSignal

Description Sets an int signal
synopsis list simxSetIntSignal(string sigName, number sigValue, string topic)
Parameters
sigName: The name of the signal
sigValue: The value of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetJointForce

Description DEPRECATED. Use simxSetJointMaxForce instead
synopsis list simxSetJointForce(number jointHandle, number forceOrTorque, string topic)
Parameters
jointHandle: The handle of the joint
forceOrTorque: The maximum force or torque that the joint can exert
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetJointMaxForce

Description Sets the maximum force or torque that a joint can exert
synopsis list simxSetJointMaxForce(number jointHandle, number forceOrTorque, string topic)
Parameters
jointHandle: The handle of the joint
forceOrTorque: The maximum force or torque that the joint can exert
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetJointPosition

Description Sets the intrinsic position of a joint
synopsis list simxSetJointPosition(number jointHandle, number position, string topic)
Parameters
jointHandle: The handle of the joint
position: The position of the joint, in radians or meters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetJointTargetPosition

Description Sets the target position of a joint
synopsis list simxSetJointTargetPosition(number jointHandle, number targetPos, string topic)
Parameters
jointHandle: The handle of the joint
targetPos: The target position of the joint, in radians or meters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetJointTargetVelocity

Description Sets the target velocity of a joint
synopsis list simxSetJointTargetVelocity(number jointHandle, number targetPos, string topic)
Parameters
jointHandle: The handle of the joint
targetPos: The target velocity of the joint, in radians/s or meters/s
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectFloatParameter

Description Sets a floating point parameter of an object
synopsis list simxSetObjectFloatParameter(number objectHandle, number/string parameterID, number parameter, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to set, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
parameter: The desired value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 in case of an error, 0 if the parameter could not be set
See also
Other languages

simxSetObjectIntParameter

Description Sets an integer parameter of an object
synopsis list simxSetObjectIntParameter(number objectHandle, number/string parameterID, number parameter, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to set, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
parameter: The desired value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 in case of an error, 0 if the parameter could not be set
See also
Other languages

simxSetObjectMatrix

Description Sets the transformation matrix of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before)
synopsis list simxSetObjectMatrix(number objectHandle, number/string relObjHandle, list matr, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the matrix is specified. Specify -1 to set the absolute matrix, "sim.handle_parent" to set the matrix relative to the object's parent, or an object handle relative to whose reference frame the matrix is specified. See also simxEvaluateToInt
matr: The desired (Xx,Yx,Zx,Px,Xy,Yy,Zy,Py,Xz,Yz,Zz,Pz) transformation matrix
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectOrientation

Description Sets the orientation (in Euler angles) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before)
synopsis list simxSetObjectOrientation(number objectHandle, number/string relObjHandle, list euler, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the orientation is specified. Specify -1 to set the absolute orientation, "sim.handle_parent" to set the orientation relative to the object's parent, or an object handle relative to whose reference frame the orientation is specified. See also simxEvaluateToInt
euler: The desired (alpha,beta,gamma) Euler-angle orientation
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectParent

Description Gives an object a new parent object
synopsis list simxSetObjectParent(number objectHandle, number parentHandle, bool assembly, bool keepInPlace, string topic)
Parameters
objectHandle: The handle of the object
parentHandle: handle of the object that will become parent, or -1 if the object should become parentless
assembly: true if the two objects can be assembled via a predefined assembly transformation (refer to the assembling option in the object common properties). In that case, parentHandle can't be -1, and keepInPlace should be set to false
keepInPlace: indicates whether the object's absolute position and orientation should remain same
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 if the operation was not successful
See also
Other languages

simxSetObjectPose

Description Sets the pose (position + quaternion) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before)
synopsis list simxSetObjectPose(number objectHandle, number/string relObjHandle, list pose, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the pose is specified. Specify -1 to set the absolute pose, "sim.handle_parent" to set the pose relative to the object's parent, or an object handle relative to whose reference frame the pose is specified. See also simxEvaluateToInt
pose: The desired (X,Y,Z,Qx,Qy,Qz,Qw) pose
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectPosition

Description Sets the position of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before)
synopsis list simxSetObjectPosition(number objectHandle, number/string relObjHandle, list position, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the position is specified. Specify -1 to set the absolute position, "sim.handle_parent" to set the position relative to the object's parent, or an object handle relative to whose reference frame the position is specified. See also simxEvaluateToInt
position: The desired (X,Y,Z) position
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectQuaternion

Description Sets the quaternion orientation of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before)
synopsis list simxSetObjectQuaternion(number objectHandle, number/string relObjHandle, list quat, string topic)
Parameters
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the orientation is specified. Specify -1 to set the absolute orientation, "sim.handle_parent" to set the orientation relative to the object's parent, or an object handle relative to whose reference frame the orientation is specified. See also simxEvaluateToInt
quat: The desired (Qx,Qy,Qz,Qw) quaternion orientation
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetObjectSelection

Description Sets the object selection state
synopsis list simxSetObjectSelection(list selection, string topic)
Parameters
selection: The handles of the objects to be selected
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 if operation was not successful
See also
Other languages

simxSetObjectStringParameter

Description Sets a string parameter of an object
synopsis list simxSetObjectStringParameter(number objectHandle, number/string parameterID, string parameter, string topic)
Parameters
objectHandle: Handle of the object
parameterID: The identifier of the parameter to set, specified as number or string. See also the list of possible object parameter identifiers and simxEvaluateToInt
parameter: The desired value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): -1 in case of an error, 0 if the parameter could not be set
See also
Other languages

simxSetStringParameter

Description Sets a string parameter
synopsis list simxSetStringParameter(number/string paramId, string paramVal, string topic)
Parameters
paramId: The parameter identifier. Can also be a string value, e.g. "sim.stringparam_scene_name". See also simxEvaluateToInt
paramVal: The value of the parameter
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetStringSignal

Description Sets a string signal. Such a signal represents a byte buffer
synopsis list simxSetStringSignal(string sigName, byteArray sigValue, string topic)
Parameters
sigName: The name of the signal
sigValue: The value of the signal
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSetVisionSensorImage

Description Applies an image of a vision sensor
synopsis list simxSetVisionSensorImage(number objectHandle, bool greyScale, byteArray img, string topic)
Parameters
objectHandle: The handle of the vision sensor
greyScale: Whether the provided image is grey scale or color
img: The image that must be provided in the same resolution as the vision sensor. In a grey scale image, each pixel is represented by one byte, with a color image, each pixel is represented by a RGB-byte-triplet
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
See also
Other languages

simxSleep

Description Waits for a certain duration
synopsis simxSleep(number durationInMs)
Parameters
durationInMs: The sleep time in milliseconds
return
See also
Other languages

simxSpin

Description Handles all callbacks for subscribers that have messages waiting, in a loop (i.e. does not return)
synopsis simxSpin()
Parameters
return
See also
Other languages

simxSpinOnce

Description Calls all callbacks for subscribers that have messages waiting, then returns
synopsis simxSpinOnce()
Parameters
return
See also
Other languages

simxStartSimulation

Description Requests a start of a simulation (or a resume of a paused simulation)
synopsis list simxStartSimulation(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the operation could not be performed. >0 in case of success
See also
Other languages

simxStopSimulation

Description Requests a stop of the running simulation
synopsis list simxStopSimulation(string topic)
Parameters
topic: The topic or communication channel to use for executing the function call
return
A list that contains:
item1 (bool): Whether the function was successfully called on the server side
item2 (number): 0 if the operation could not be performed. >0 in case of success
See also
Other languages

simxSynchronous

Description Enables/disables the CoppeliaSim synchronous mode during simulation. In synchonous mode, each simulation step will require an external trigger signal in order to be run
synopsis simxSynchronous(bool enable)
Parameters
enable: The enable state of the synchonous mode
return
See also
Other languages

simxSynchronousTrigger

Description Triggers next simulation step, if the CoppeliaSim synchronous mode was previously enabled
synopsis simxSynchronousTrigger()
Parameters
return
See also
Other languages

Topics / Communication channels

simxServiceCall
simxDefaultPublisher
simxDefaultSubscriber
simxCreatePublisher
simxCreateSubscriber