EvaluateCollectionExpressionResult EvaluateCollectionExpressions(OdId tObject, EvaluateCollectionExpressionArg tArg)
tObject. Moniker of the unit in running in debugging mode.
tArg. Operation execution parameters.
The EvaluateCollectionExpressions operation calculates the expression that results in set of values.
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.
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.
{
"EvaluateCollectionExpressions" :
{
"tObject" :
{
"id" : "EDOPGFIAGFBOFOAENKGBHKMMBAJLIDKEDLEKONHMPDMJLCHN!M!305383"
},
"tArg" :
{
"expression" : "ResultMatrix"
}
}
}
{
"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: