Regular API function

sim.callScriptFunction

Description Calls a script function (from a plugin, the main client application, or from another script). This represents a user callback inside of a script. The target script must be initialized for this call to succeed, e.g. when calling simulation scripts, then simulation must be running. See also sim.executeScriptString.
C/C++
synopsis
From C/C++, call simCallScriptFunctionEx instead.
C/C++
parameters
C/C++
return value
Lua synopsis ...=sim.callScriptFunction(string functionNameAtScriptName,int scriptHandleOrType,...)
Lua parameters
functionNameAtScriptName: the function to call.
if scriptHandleOrType is sim.scripttype_childscript or sim.scripttype_customizationscript, then append to the string '@' and the path of the object the script is attached to, e.g. "func@/path/to/object"
if scriptHandleOrType is sim.scripttype_addonscript, then append to the string '@' and the name of the add-on, e.g. "func@Isometric scaling"
scriptHandleOrType: the handle of the script, otherwise the type of the script
...: any number of arguments that will be handed over to the called function.
Lua return values
...: any number of return values from the called function.
Python synopsis ...=sim.callScriptFunction(string functionNameAtScriptName,int scriptHandleOrType,...)