AddNamedExpression

Creates a named expression using the expression at the top of the stack.

UI Access Click Add in the Fields Calculator window.
Parameters
Name Type Description
<ExprName> String Name for the new named expression.
<FieldType> String Type of field.
<Expression> Array

Defines an expression to be solved in the calculator. .

See Support Expression Input in Fields Calculator for more details.

Return Value None

 

Python Syntax AddNamedExpression(<ExprName>, <FieldType>)
Python Example

oModule.AddNamedExpression("Mag_JxE", "Fields")

 

HFSS users can create an expression that uses the the Algebraic option. In this case, no Stack commands are necessary; you can define the expression within AddNamedExpression command:

oModule.AddNamedExpression("new2", "Fields",

[

"Algebraic:=" , "Mean( VolumeValue(Box1), Mag_B )"

])

The same command in Stack form would look like this:

oModule.AddNamedExpression("new2", "Fields",

[

"NameOfExpression:=" , ["Mag_B"],

"EnterVolume:=" , ["Box1"],

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

"Operation:=" , ["Mean"]

])

For information, see Syntax for Algebraic Option.