Regular API function

simGetApiFunc / sim.getApiFunc

Description Retrieves all API functions and variables that match a specific word. Useful for script code auto-completion functionality. See also sim.getApiInfo.
C synopsis simChar* simGetApiFunc(simInt scriptHandleOrType,const simChar* apiWord)
C parameters
scriptHandleOrType: the handle of the script, otherwise the type of the script.
apiWord: the word that API functions and variables should match, e.g. "sim.getObj". Only matches up to the first dot are returned, if the apiWord does not contain any dot. To retrieve all functions and variables, leave apiWord empty. To retrieve only functions, add '+' as prefix. To retrieve only variables, add '-' as prefix.
C return value
NULL in case of an error, or if there is no match. Otherwise all matching API functions and variables, space-separated. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis table funcsAndVars=sim.getApiFunc(number scriptHandleOrType,string apiWord)
Lua parameters
Similar to the C-function
Lua return values
funcsAndVars: nil in case of an error, otherwise a table containing all matching API functions and variables.

All regular API functions on one page