Table of Contents

Method SetPropertyValue

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

SetPropertyValue(string, string)

Sets the value of a writable element property.

public virtual void SetPropertyValue(string propertyName, string propertyValue)

Parameters

propertyName string

The property name.

propertyValue string

The value to set.

Examples

Element element = engine.FindElement(400, 2000);
element.SetPropertyValue("My Custom Property", "Example Value");

Remarks

From DataMiner 10.0.5 (RN 25025, RN 25195) onwards, this method will only return after having checked that the property was set correctly.

Prior to DataMiner 10.0.5, when the value of an element property was updated using the SetPropertyValue method on an Element object and immediately retrieved using the GetPropertyValue method, in some cases, the value returned by that last method would incorrectly be the previous value.

note

The SetPropertyValue method will only perform the above-mentioned check when the “check sets” option is enabled.

  • Before launching a script in Cube, select the “After executing a SET command, check if the read parameter or property has been set to the new value” checkbox in the script execution window.
  • When launching a script using ExecuteScriptMessage, make sure to activate the CHECKSETS option(“CHECKSETS:TRUE”).

With this option enabled, the SetPropertyValue method will take slightly longer to execute. When a large number of properties need to be updated that do not need to be retrieved immediately, you can disable this option in order to increase performance.