SetExpressionValue

Syntax

SetExpressionValueResult SetExpressionValue(OdId tObject, SetExpressionValueArg tArg)

Parameters

tObject. Moniker of the development environment object, for which debugging is running.

tArg. Operation execution parameters.

Description

The SetExpressionValue operation changes expression value during code debugging.

Comments

The operation changes the expression that takes simple data type value. To execute the operation, in the tObject field specify moniker of the object that is in debugging mode, and in the tArg field specify value change parameters.

The operation results in the updated information about expression calculation result.

Example

Below is the example of changing expression value during code debugging. The request contains moniker of the object that is in debugging mode, and the expression to be changed with new value. The response contains the updated information about the expression.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetExpressionValue xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>PBIOBPCAEDCOFOAEFFEFLOBMFDKGKIMENIGAAFCLHCNIIEAC!M!305559</id>
  </tObject>
<tArg xmlns="">
  <expression>count</expression>
  <newValue>50</newValue>
  </tArg>
  </SetExpressionValue>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetExpressionValueResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<resultStruct xmlns="">
  <name>count</name>
  <className>System.Integer</className>
  <value>50</value>
  </resultStruct>
  </SetExpressionValueResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetExpressionValue" :
{
"tObject" :
{
"id" : "PBIOBPCAEDCOFOAEFFEFLOBMFDKGKIMENIGAAFCLHCNIIEAC!M!305559"
},
"tArg" :
{
"expression" : "count",
"newValue" : "50"
}
}
}

JSON response:

{
"SetExpressionValueResult" :
{
"resultStruct" :
{
"name" : "count",
"className" : "System.Integer",
"value" : "50"
}
}
}
public static SetExpressionValueResult SetExpressionValue(MbId mb, string modId, string evaluateExpression, string newExprValue)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetExpressionValue()
{
tArg = new SetExpressionValueArg()
{
expression = evaluateExpression,
newValue = newExprValue
},
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Change value
var result = somClient.SetExpressionValue(tSet);
return result;
}

See also:

Working with Development Environment