Method SelectScriptParam
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
SelectScriptParam(int, ScriptParam)
Links a script parameter from the main script to a script parameter from a subscript.
public void SelectScriptParam(int id, ScriptParam param)
Parameters
id
intThe ID of the script parameter in the subscript.
param
ScriptParamThe script parameter of the main script to link to the script parameter of the subscript.
Examples
Parent script:
var myParam = engine.GetScriptParam("parentParam");
myParam.SetParamValue("MyValue");
var subscript = engine.PrepareSubScript("MySybscript");
subscript.SelectScriptParam(1, myParam);
subscript.StartScript();
Sub-script:
var myParam = engine.GetScriptParam(1);
engine.GenerateInformation(myParam.Value); // This will generate an information event with value "MyValue".
Exceptions
- ArgumentNullException
param
is null.
SelectScriptParam(int, string)
Sets the script parameter of the subscript with the specified ID to the specified value.
public void SelectScriptParam(int id, string val)
Parameters
Examples
var subscript = engine.PrepareSubScript("MySybscript");
subscript.SelectScriptParam(1, "myValue");
subscript.StartScript();
Exceptions
- ArgumentNullException
val
is null.
SelectScriptParam(string, ScriptParam)
Links a script parameter from the main script to a script parameter from a subscript.
public void SelectScriptParam(string name, ScriptParam param)
Parameters
name
stringThe name of the script parameter in the subscript.
param
ScriptParamThe script parameter of the main script to link to the script parameter of the subscript.
Examples
Parent script:
var myParam = engine.GetScriptParam("parentParam");
myParam.SetParamValue("MyValue");
var subscript = engine.PrepareSubScript("MySybscript");
subscript.SelectScriptParam("subscriptParam", myParam);
subscript.StartScript();
Sub-script:
var myParam = engine.GetScriptParam("subscriptParam");
engine.GenerateInformation(myParam.Value); // This will generate an information event with value "MyValue".
Exceptions
SelectScriptParam(string, string)
Sets the script parameter of the subscript with the specified name to the specified value.
public void SelectScriptParam(string name, string val)
Parameters
Examples
var subscript = engine.PrepareSubScript("MySybscript");
subscript.SelectScriptParam("subscriptParam", "myValue");
subscript.StartScript();