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
idintThe ID of the script parameter in the subscript.
paramScriptParamThe 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
paramis 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
valis 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
namestringThe name of the script parameter in the subscript.
paramScriptParamThe 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();