create_output_variable#

TwinBuilder.create_output_variable(variable, expression, solution=None, context=None, is_differential=False)#

Create or modify an output variable.

Parameters:
variablestr, optional

Name of the variable.

expressionstr, optional

Value for the variable.

solutionstr, optional

Name of the solution in the format “name : sweep_name”. If None, the first available solution is used. Default is None.

contextlist, str, optional

Context under which the output variable will produce results.

is_differentialbool, optional

Whether the expression corresponds to a differential pair. This parameter is only valid for HFSS 3D Layout and Circuit design types. The default value is False.

Returns:
bool

True when successful, False when failed.

References

>>> oModule.CreateOutputVariable

Examples

>>> from ansys.aedt.core import Circuit
>>> aedtapp = Circuit()
>>> aedtapp.create_output_variable(variable="output_diff", expression="S(Comm,Diff)", is_differential=True)
>>> aedtapp.create_output_variable(variable="output_terminal", expression="S(1,1)", is_differential=False)