Extending the legacy remote API
Instead of extending the functions that the legacy remote API offers, one can use the generic legacy remote API function simxCallScriptFunction: this will call a CoppeliaSim script function, which can then execute any type of operation locally, then return data. The called script function should always have following input/output form:
The legacy remote API client application would then call above script function in following manner (e.g. via a Python script):
Make sure that the script, where you are trying to call a function, is initialized: trying to call a function in a simulation script, while simulation is not running will not work. For other usage examples, refer to the various files named complexCommandTest.* in folder programming/remoteApiBindings.