ClcEval

Evaluates the expression at the top of the stack using the provided solution name and variable values.

UI Access Click Eval in the Fields Calculator dialog.
Parameters
Name Type Description
<SoluName> String Name of specified solution.
<VarArray> Array Array of variable name, value pairs.
<Expression> Array Defines an expression to be solved in the calculator. It can be an algebraic or stacked (default) expression; the Algebraic option requires a beta feature; see Algebraic option. Note that for legacy scripts, this parameter is optional because the expression may have been created with another command.
<FieldType> String Optional. Type of specified field.
Return Value None

 

Python Syntax ClcEval(<SoluName>, <Expression>, <VarArray>, [Optional <FieldType>])
Python Example

Legacy script with no expression:

oModule.ClcEval("Setup1: LastAdaptive",

["Freq:=", "10GHz",

"Phase:=", "0deg"])

Example with algebraic expression:

oModule.ClcEval("setup1 : LastAdaptive",

[

"NAME:Evaluate",

[

"NAME:Algebraic",

"Name:=" , [""],

"Algebraic:=" , "Mean( Volume(sec_1_1), Mag_H )"

],

[

"NAME:Context",

"Freq:=" , "60Hz",

"Ihv:=" , "(833.3*1.414*232) A",

"Ilv:=" , "-Ihv/1404",

"Phase:=" , "0deg",

"height:=" , "1mm"

]

], "Fields")

Example with stack expression:

oModule.ClcEval("setup1 : LastAdaptive",

[

"NAME:Evaluate",

[

"NAME:Expression",

"Name:=" , [""],

"Expression:=" , ["Mean(Volume(sec_1_1), Mag_H)"],

"NameOfExpression:=" , ["Mag_H"],

"EnterVolume:=" , ["sec_1_1"],

"Operation:=" , ["VolumeValue"],

"Operation:=" , ["Mean"]

],

[

"NAME:Context",

"Freq:=" , "60Hz",

"Ihv:=" , "(833.3*1.414*232) A",

"Ilv:=" , "-Ihv/1404",

"Phase:=" , "0deg",

"height:=" , "1mm"

]

], "Fields")