Skip to main content

Call function in session

Call a function defined in an open script session with arguments, and return what it returns (G4).

Command in the Scripts toolkit · id ooa.script/call_in_session · 6 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
SessionStringNoscriptName of the script session, from Open script session.
FunctionStringYesFunction name; dots for a function of an object or module.
ArgumentsListNoArguments in order.
Keyword argumentsDictionaryNoPython only: named arguments.
Timeout (seconds)NumberNo300Maximum run time; the session is closed when it runs out.
Fail on errorBooleanNotrueStop the step when the function raises an error.

Outputs​

OutputTypeWhat it is
resultAnyValue the function returned.
outputStringText the function printed.
errorStringThe error when fail_on_error is off; empty on success.