delete_expression#

FieldsCalculator.delete_expression(name=None)#

Delete a named expression.

Parameters:
namestr, optional

Name of the named expression. The default is None, in which case all named expressions are deleted.

Returns:
bool

True when successful, False when failed.

Examples

>>> from ansys.aedt.core import Hfss
>>> hfss = Hfss()
>>> poly = hfss.modeler.create_polyline([[0, 0, 0], [1, 0, 1]], name="Polyline1")
>>> expr_name = hfss.post.fields_calculator.add_expression("voltage_line", "Polyline1")
>>> hfss.post.fields_calculator.delete_expression(expr_name)
>>> hfss.release_desktop(False, False)