named_expression#

FieldExpressions.named_expression(name: str, is_vector: bool = False, is_complex: bool = True) FieldExpression#

Start from a previously defined named expression.

Parameters:
namestr

Existing AEDT named-expression name.

is_vectorbool, optional

Whether the named expression returns a vector quantity.

is_complexbool, optional

Whether the named expression returns a complex quantity.

Returns:
FieldExpression

Typed expression seeded with NameOfExpression('<name>').

Examples

Reuse a named expression as a new starting point.

>>> from ansys.aedt.core.visualization.post.field_calculator_expressions import FieldExpressions
>>> fx = FieldExpressions(calculator=None)
>>> fx.named_expression("Poynting", is_vector=True).operations
["NameOfExpression('Poynting')"]