Table of Contents

Method GetParameterByData

Namespace
Skyline.DataMiner.Scripting
Assembly
SLManagedScripting.dll

GetParameterByData(string)

Retrieves the parameter value corresponding with the parameter that has the specified data is stored in the ElementData.xml file.

[Obsolete("This method is obsolete since DataMiner 10.3.4.")]
object GetParameterByData(string data)

Parameters

data string

The data value stored in the ElementData.xml for the parameter.

Returns

object

The parameter value. In case ElementData.xml does not contain a parameter with the specified data, a null reference is returned.

Examples

Consider the following parameter with default value ‘A’:

<Param id = "1" trending = "false">
	<Name> ExampleParameter</Name>
	<Description>AnExampleParameter</Description>
	<Type>read</Type>
	<Interprete>
		<RawType>other</RawType>
		<LengthType>next param</LengthType>
		<Type>string</Type>
		<DefaultValue>A</DefaultValue>
	</Interprete>
	<Display>
		<RTDisplay>false</RTDisplay>
	</Display>
	<Measurement>
		<Type>string</Type>
	</Measurement>
</Param>

Suppose the ElementData.xml file contains the following in the ItemData tag:

<ItemData>
	<Param id = "1">Data</Param>
</ItemData>

In this example the result will be the string “A”.

object result = protocol.GetParameterByData("Data");

Remarks

  • This is a wrapper method for the NotifyProtocol type 87 NT_GET_PARAMETER_BY_DATA call.
  • This method is intended to be used when the data stored in the ElementData.xml file is unique for all parameters. If this is not the case, the method will return the value of one of the parameters that has the specified value in the ElementData.xml file.
  • This method is deprecated since DataMiner 10.3.4.