Table of Contents

Method SetParameterByData

Namespace
Skyline.DataMiner.Scripting
Assembly
SLManagedScripting.dll

SetParameterByData(string, object)

Sets the parameter that has the specified data in the ElementData.xml file to the specified value.

[Obsolete("This method is obsolete since DataMiner 10.3.4.")]
int SetParameterByData(string data, object value)

Parameters

data string

The data value in the ElementData.xml file of the parameter to set.

value object

The value to set.

Returns

int

HRESULT value. A value of 0 (S_OK) indicates the set succeeded.

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>

Then parameter 1 will have the value “B” after performing the following method call:

int result = protocol.SetParameterByData("Data", "B");

Remarks

  • This is a wrapper method for the NotifyProtocol type 86 NT_SET_PARAMETER_BY_DATA call.
  • In case multiple parameters need to be set by data, use the SLProtocol.SetParametersByData method instead.
  • This method is deprecated since DataMiner 10.3.4.