CreateOutputVariable

Adds a new output variable. Different forms of this command are executed for different design types.

Note:

Output variables are associated with a name and an expression. The name is not permitted to collide with design variable, sim value, or other output variable names. It cannot have spaces or any arithmetic or other operators in it. Expression definitions cannot be cyclic. For example, A = 2*B, B=3*A is not allowed.

UI Access HFSS > Results > Output Variables.
Parameters
Name Type Description
<OutputVarName> String Name of the new output variable.
<Expression> Value Value to assign to the variable.
<SolutionName> String Name of the solution, as seen in the output variable UI.

<reportType> or <solutionType>

String

The name of the report type as seen in the output variable UI.

For Layout Editor, use the solution type.

<ContextArray> or <DomainArray>

Array

Structured array containing context for which the output variable expression is being evaluated.

Array("Context:=", <string>)

For Layout Editor, use Domain array:

Array("Domain:=", <string>)

Return Value None.

 

Python Syntax CreateOutputVariable (<OutputVarName>, <Expression>, <SolutionName>, <reportType | solutionType>, <contextArray | domainArray>)
Python Example

HFSS Example:

oModule.CreateOutputVariable("Var" & OutputQuantity, OutputQuantity, Solution, "Far Fields", ["Context:=", InfiniteSphere, "Domain:=", "Sweep"])

Layout Editor Example :

Set oModule = oDesign.GetModule("OutputVariable")

oModule.CreateOutputVariable("test","mag(S(WavePort1,WavePort1))", "Setup1 : LastAdaptive ", "Modal Solution Data", ["Domain:=", "Sweep"])