Method GetRawValue
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
GetRawValue(int, string)
Gets the value that corresponds with the specified display value of the specified parameter.
public virtual string GetRawValue(int pid, string displayValue)
Parameters
pidintThe ID of the parameter.
displayValuestringThe display value for which the raw value has to be determined.
Returns
- string
The raw value that corresponds with the specified display value.
In case the parameter was not found, the specified value indisplayValueis returned.
In case the parameter was found, but the display value is not specified in the parameter, null is returned.
Examples
var dummy = engine.GetDummy("dummy1");
string rawValue = dummy.GetRawValue(100, "Main");
Remarks
Used with parameters defining discrete entries to retrieve the raw value (e.g. "1") for a specific display value (e.g. “Main”).
GetRawValue(string, string)
Gets the value that corresponds with the specified display value of the specified parameter.
note
Please use an overload that takes the parameter ID instead to prevent issues in case the parameter Description changes.
[Obsolete("Use overloads with parameter ID instead of name.")]
public virtual string GetRawValue(string name, string displayValue)
Parameters
namestringThe name of the parameter.
displayValuestringThe display value for which the raw value has to be determined.
Returns
- string
The raw value that corresponds with the specified display value.
In case the parameter was not found, the specified value indisplayValueis returned.
In case the parameter was found, but the display value is not specified in the parameter, null is returned.
Examples
var dummy = engine.GetDummy("dummy1");
string rawValue = dummy.GetRawValue("MyDiscreteParameter", "Main");
Remarks
The specified value for the name argument should be the value of the Description tag of the parameter and not the value of the Name tag.
Used with parameters defining discrete entries to retrieve the raw value (e.g. "1") for a specific display value (e.g. “Main”).