CreateReport

Creates a new report with a single trace and adds it to the Results branch in the project tree.

UI Access Right-click on Results > Create [Type] Report
Parameters
Name Type Description
<ReportName> String Name of report.
<ReportType> String Type of report.

Possible values are:

"Modal S Parameters" - Only for Driven Modal solution-type problems with ports.

"Terminal S Parameters" - Only for Driven Terminal solution-type problems with ports.

"Eigenmode Parameters" - Only for Eigenmode solution-type problems.

"Fields"

"Far Fields" - Only for problems with radiation or PML boundaries.

"Near Fields" - Only for problems with radiation or PML boundaries.

"Emission Test"

<DisplayType> String Type of display.

If ReportType is "Modal S Parameters", "Terminal S Parameters", or "Eigenmode Parameters", then set to one of the following:

"Rectangular Plot", "Polar Plot", "Radiation Pattern", "Smith Chart", "Data Table", "3D Rectangular Plot", "3D Rectangular Bar Plot", "Rectangular Stacked Plot" or "3D Polar Plot".

If <ReportType> is "Fields", then set to one of the following:

"Rectangular Plot", "Polar Plot", "Radiation Pattern", "Rectangular Contour Plot", "Data Table", "3D Rectangular Plot", "Rectangular Stacked Plot" or "3D Rectangular Bar Plot".

If <ReportType> is "Far Fields" or "Near Fields", then set to one of the following:

"Rectangular Plot", "Radiation Pattern", "Rectangular Contour Plot", "Data Table", "3D Rectangular Plot", "3D Rectangular Bar Plot" "Rectangular Stacked Plot" or "3D Polar Plot"  

If <ReportType> is "Emission Test", then set to one of the following:

"Rectangular Plot" or "Data Table"

<SolutionName> String Name of the solution as listed in the Modify Report dialog box.

<ContextArray>

Array

Context for which the expression is being evaluated. This can be an empty string if there is no context.

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

<DomainType> ex. "Sweep" or "Time"

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

<GeometryType>

ex. "Infinite Spheren", "Spheren", "Polylinen"

<FamiliesArray>

Array

Contains sweep definitions for the report.

Array("<VariableName>:= ", <ValueArray>)

<ValueArray>

Array("All") or Array("Value1", "Value2", ..."Valuen")

examples of <VariableName> "Freq", "Theta", "Distance"

<ReportDataArray>

Array

This array contains the report quantity and X, Y, and (Z) axis definitions.

Array("X Component:=", <VariableName>, "Y Component:=", <VariableName> | <ReportQuantityArray>)

<ReportQuantityArray>

ex. Array("dB(S(Port1, Port1))")

Return Value None.

 

Python Syntax

CreateReport(<ReportName>, <ReportType>, <DisplayType>,

<SolutionName>, <ContextArray>, <FamiliesArray>,

<ReportDataArray>, <ExtendedInfo>)

Python Example

Several examples are given below: (nominal, Optimetrics, spectral, Partial Discharge, 3D rectangular Bar Plot with Change Bar Properties, and Add a new orientation to a 3D model and 3D report)

Nominal Example:

oModule.CreateReport( "XY Plot 2", "Standard", "Rectangular Plot", "TR", [ "NAME:Context", "SimValueContext:=", [], 1, 0, 2, 0, false, false, -1, 1, 0, 1, 1, "", 0, 0] ], [ "Time:=" , ["All"], "aaa:=" , ["Nominal"] ], [ "X Component:=", "Time", "Y Component:=", ["E1.I"] ], [])

Optimetrics Example:

oModule.CreateReport ("XY Plot 3", "Standard", "Rectangular Plot", "TR", [ "NAME:Context", "OptiSetup:=", "ParametricSetup1", "SimValueContext:=", [ 1, 0, 2, 0, false, false, 0, 1,0, 1, 1, "", 0, 0 ] ], [ "Time:=", ["All"], "aaa:=", ["Nominal"] ], [ "X Component:=" , "Time", "Y Component:=" , ["E1.I"] ], [])

Spectral Example:

oModule.CreateReport ("XY Plot 4", "Standard", "Rectangular Plot", "TR", [ "NAME:Context", "SimValueContext:=", [ 2, 0, 2, 0, false, false, -1, 1, 0, 1, 1, "", 0, 0, "CG", false, "0", "KP",false, "0", "MH", false, "100", "TE", false, "40ms", "TH", false, "40", "TS", false, "0ns", "UF", false, "0", "WT", false, "0", "WW", false, "100" ] ], [ "Spectrum:=" , ["All"], "aaa:=", ["Nominal"] ], [ "X Component:=","Spectrum", "Y Component:=", ["mag(E1.I)"] ], [])

Partial Discharge Example

oModule.CreateReport("Partial Discharge Plot 2", "Partial Discharge", "Rectangular Plot", "PartialDischarge1 : PartialDischarge", [], [ "GasPressure:=", ["All"], "Freq:=" , ["All"], "bend_angle:=" , ["All"] ], [ "X Component:=", "GasPressure", "Y Component:=", ["Power"] ])

Example 3D Rectangular Bar Plot with Change Bar properties

oModule = oDesign.GetModule("ReportSetup") oModule.CreateReport("S Parameter Plot 4", "Modal Solution Data", "3D Rectangular Bar Plot", "Setup1 : Sweep", [], [ "Freq:=" , ["All"], "UU:=" , ["All"], "ZZZ:=" , ["Nominal"] ], [ "X Component:=", "Freq", "Y Component:=", "UU", "Z Component:=", ["dB(S(wDipole1_1_p1,wDipole1_1_p1))"] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers" "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Transparency", "Value:=", "0.5" ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Filled", "Value:=", False ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Filled", "Value:=", True ] ] ] oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Show Outline", "Value:=", True ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Outline Color", "R:=", 0, "G:=", 0, "B:=", 160 ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Outline Width", "Value:=", "2" ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Bar Width", "Value:=", "Narrow" ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Bar Width", "Value:=", "Wide" ] ] ] ]) oModule.ChangeProperty( [ "NAME:AllTabs", [ "NAME:Bar", [ "NAME:PropServers", "S Parameter Plot 4:Traces-dB(S(wDipole1_1_p1,wDipole1_1_p1))" ], [ "NAME:ChangedProps", [ "NAME:Bar Infinity", "Value:=", True ] ] ] ])

Example Script to add a new orientation to a 3D model and 3D report

### "AddViewOrientation" script command for 3D Report. The first argument must be the 3D report name.

import ScriptEnv

ScriptEnv.Initialize("Ansoft.ElectronicsDesktop")

oDesktop.RestoreWindow()

oDesktop.OpenProject("D:/Tee.aedt")

oProject = oDesktop.SetActiveProject("Project")

oDesign = oProject.SetActiveDesign("HFSSDesign1")

oModule = oDesign.GetModule("ReportSetup")

oModule.AddViewOrientation("Gain Plot 1", "3dreport", True,

[

"NAME:OrientationVectorComponents",

[

"NAME:Direction",

-0.634171009063721,

0.12737800180912,

-0.762628972530365

],

[

"NAME:Up",

-0.577874004840851,

0.577228009700775,

0.57694798707962

]

],

[

"NAME:ProjectionParams",

[

"NAME:Scaling",

1.10227048397064,

1.10227036476135,

1.10227036476135

],

[

"NAME:Translation",

-0.601842045783997,

-0.352552056312561,

-6.46677732467651

],

"ProjectionType:=" , "Orthographic",

[

"NAME:ProjectionLimits",

-2.53312301635742,

2.53312301635742,

-1,

1,

0.994183540344238,

10.5401248931885

]

])

oEditor = oDesign.SetActiveEditor("3D Modeler")

oEditor.AddViewOrientation("3dmodel", True,

[

"NAME:OrientationVectorComponents",

[

"NAME:Direction",

-0.627739012241364,

-0.134194001555443,

-0.766768991947174

],

[

"NAME:Up",

-0.694571018218994,

0.54128497838974,

0.473899990320206

]

],

[

"NAME:ProjectionParams",

[

"NAME:Scaling",

0.0173665378242731,

0.017366535961628,

0.0173665322363377

],

[

"NAME:Translation",

-0.0742612779140472,

0.195189163088799,

-5.89852476119995

],

"ProjectionType:=" , "Orthographic",

[

"NAME:ProjectionLimits",

-2.27072739601135,

2.27072739601135,

-1,

1,

0.424737930297852,

10.8078212738037

]

])

oDesktop.CloseProject("Project")