EvaluateCollectionExpressions

Syntax

EvaluateCollectionExpressionResult EvaluateCollectionExpressions(OdId tObject, EvaluateCollectionExpressionArg tArg)

Parameters

tObject. Moniker of the unit in running in debugging mode.

tArg. Operation execution parameters.

Description

The EvaluateCollectionExpressions operation calculates the expression that results in set of values.

Comments

The operation calculates the expression, which results in the array, matrix, or values collection, in the debugging mode. To execute the operation, in the tObject field specify moniker of the object that is running in the debugging mode, and in the tArg field specify expression calculation options.

The operation results in the obtained set of values and information about the dimensions, which this set of values consists of.

Example

Below is the example of calculating an expression that returns the set of values. The request contains moniker of the unit that is running in the debugging mode and the calculated expression. The response contains the obtained values.

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">
<EvaluateCollectionExpressions xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>EDOPGFIAGFBOFOAENKGBHKMMBAJLIDKEDLEKONHMPDMJLCHN!M!305383</id>
  </tObject>
<tArg xmlns="">
  <expression>ResultMatrix</expression>
  </tArg>
  </EvaluateCollectionExpressions>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<EvaluateCollectionExpressionsResult 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">
<matrixResult xmlns="">
<dimensions>
  <it>3</it>
  <it>4</it>
  </dimensions>
<keys>
  <it>0</it>
  <it>1</it>
  <it>2</it>
  <it>0</it>
  <it>1</it>
  <it>2</it>
  <it>3</it>
  </keys>
<values>
  <it>3.220628311244681</it>
  <it>2.944056423817746</it>
  <it>2.762968961482369</it>
  <it>2.652021025262234</it>
  <it>2.720724827798729</it>
  <it>2.895596386255474</it>
  <it>2.907073790668661</it>
  <it>2.794850570948003</it>
  <it>2.429964700486113</it>
  <it>2.572954698507732</it>
  <it>2.816530059500973</it>
  <it>3.151924435162425</it>
  </values>
  </matrixResult>
  </EvaluateCollectionExpressionsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"EvaluateCollectionExpressions" :
{
"tObject" :
{
"id" : "EDOPGFIAGFBOFOAENKGBHKMMBAJLIDKEDLEKONHMPDMJLCHN!M!305383"
},
"tArg" :
{
"expression" : "ResultMatrix"
}
}
}

JSON response:

{
"EvaluateCollectionExpressionsResult" :
{
"matrixResult" :
{
"dimensions" :
{
"it" :
[
"3",
"4"
]
},
"keys" :
{
"it" :
[
"0",
"1",
"2",
"0",
"1",
"2",
"3"
]
},
"values" :
{
"it" :
[
"3.220628311244681",
"2.944056423817746",
"2.762968961482369",
"2.652021025262234",
"2.720724827798729",
"2.895596386255474",
"2.907073790668661",
"2.794850570948003",
"2.429964700486113",
"2.572954698507732",
"2.816530059500973",
"3.151924435162425"
]
}
}
}
}
public static EvaluateCollectionExpressionResult EvaluateCollectionExpressions(MbId mb, string modId, string evaluateExpression)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new EvaluateCollectionExpressions()
{
tArg = new EvaluateCollectionExpressionArg()
{
expression = evaluateExpression
},
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Calculate expression
var result = somClient.EvaluateCollectionExpressions(tGet);
return result;
}

See also:

Working with Development Environment