ApiData().SetExuderScript
Sets the programmatic script content for the given indexed Exuder within the given Behavior.
Description
This function sets the script content for any one of three execution stages in a particular identified Exuder, modifying the current SILVIA Brain to do so. These stages include “val” (Validation), “pre” (Pre-Behavior), and “post” (Post-Behavior). C# (C-Sharp) is the default Scripting Language for the SILVIA Core, and is defined as “cs” for the purposes of this method.
Example Usages (C#)
bool success = _core.ApiData().SetExuderScript(147, 0, “val”, “cs”, myValidationScript);
success = _core.ApiData().SetExuderScript(147, 0, “pre”, “cs”, myPreScript); success = _core.ApiData().SetExuderScript(147, 0, “post”, “cs”, myPostScript);
Parameters
int |
id |
The numeric integer value or variable id of the Behavior to modify by setting the script. |
int |
exuderId |
The numeric integer value or variable representing the zero-indexed ID of the Exuder, separate from the Behavior ID. |
string |
stage |
The string value representing one of the three Scripting Stages, “val”, “pre”, or “post”. |
string |
language |
The string value representing the Scripting Language C#, “cs”. |
string |
script |
The string value representing the script code to apply to the given Exuder within the Behavior. |
Returns
The boolean success or failure of the operation.