Table of Contents

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 int

The ID of the script parameter in the subscript.

param ScriptParam

The 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

id int

The ID of the script parameter in the subscript.

val string

The value to set.

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 string

The name of the script parameter in the subscript.

param ScriptParam

The 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

ArgumentNullException

name is null
-or-
param is null.

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

name string

The name of the script parameter in the subscript.

val string

The value to set.

Examples

var subscript = engine.PrepareSubScript("MySybscript");

subscript.SelectScriptParam("subscriptParam", "myValue");

subscript.StartScript();

Exceptions

ArgumentNullException

name is null
-or-
val is null.