CreateFieldPlot

Note:

Use in conjunction with GetGeometryIdsForNetLayerCombinations and GetGeometryIdsForAllNetLayerCombinations.

  • GetGeometryIdsForNetLayerCombinations returns ID numbers of all faces and edges of the active design related to the current target combination of nets and layers.
  • GetGeometryIdsForAllNetLayerCombinations returns ID numbers for all possible combinations of nets and layers it is possible to choose.

Use: Creates a field/mesh plot "Field" or a visual ray trace ("VRT") plot.

Syntax: CreateFieldPlot <PlotParameterArray> ["Field" | "VRT"]

Return Value: None

Parameters: <PlotParameterArray> "Field"

Array("NAME:<PlotName>",

"SolutionName:=", <string>,
"QuantityName:=", <string>,
"PlotFolder:=", <string>,
"UserSpecifyName:=", <int>,
"UserSpecifyFolder:=", <int>,
"IntrinsicVar:=", <string>,
"PlotGeomInfo:=", <PlotGeomArray>,
"FilterBoxes:=", <FilterBoxArray>,
<PlotOnPointsSettings>,
<PlotOnLineSettings>,
<PlotOnSurfaceSettings>,
<PlotOnVolumeSettings>)

SolutionName:

Name of the solution setup and solution formatted as

"<SolveSetupName>: <WhichSolution>",

where <WhichSolution> can be "Adaptive_<n>", "LastAdaptive", or "PortOnly".

For example: "Setup1 : Adaptive_2"

A space is required on either side of the colon ( : ) character. If omitted, the plot will not be created.

QuantityName:

Type of plot to create. Possible values vary according to the solver.

Mesh plots: "Mesh"

PlotFolder:

Name of the folder to which the plot should be added. (Values vary with the design type.) Some possible values include

"E Field", "H Field", "Jvol", "Jsurf", "SAR Field",
"Jc","Surface-Loss", "QSurf", "Temperature", "Energy",
"Average-Surface-Loss-Density, "Dielectric_Loss",
"MeshPlots", "Heat Flux", and "Displacement"

UserSpecifyName

0 if default name for plot is used, 1 otherwise.

Not needed. <PlotName> will be respected regardless of whether thisflag is set.

UserSpecifyFolder

0 if default folder for plot is used, 1 otherwise.

Not needed. The specified PlotFolder will be respected regardless of whether this flag is set.

IntrinsicVar:

Formatted string that specifies the frequency and phase at which to make the plot.

For example: "Freq='1GHz' Phase='30deg'"

PlotGeomInfo:

Creating field plot on selected layer-net pairs:

For example, Maxwell: "PlotGeomInfo:=", [1,"Volume","ObjList",
2,"LC1_1:Top","LC1_1:Top#L1"]

HFSS example with "Plot on surface" option is not checked:

"PlotGeomInfo:=", [1,"Volume","LayerNets",2,​ "Top",2,
"net1","net2","Ground",1,"GND"]

The command creates field plot on two layer-nets combinations. It starts with type "Volume", and subtype "LayerNets", followed by the number of layer-nets combinations which is 2 in this example.

The two layer-nets combinations are (1) "Top" layer, two nets, net names are "net1" and "net2", i.e., [Top, net1] pair, and [Top, net2] pair. (2) "Ground" layer and one net, net name is "GND", i.e., [Ground, GND] pair.

HFSS example with "Plot on surface" option checked:

"PlotGeomInfo:=", [1,"Surface","LayerNetsExtFace",2,
"Top",2,"net1","net2",_"Ground",1,"GND"]

​The command creates field plot on two layer-nets combinations. It starts with type "Surface", and subtype "LayerNetsExtFace", followed by the number of layer-nets combinations which is 2 in this example.

The two layer-nets combinations are (1) "Top" layer, two nets, net names are "net1" and "net2", i.e., [Top, net1] pair, and [Top, net2] pair. (2) "Ground" layer and one net, net name is "GND", i.e., [Ground, GND] pair.

Limitations:

<PlotGeomArray>

Array(<NumGeomTypes>, <GeomTypeData>, <GeomTypeData>, ...)

For example: Array(4, "Volume", "ObjList", 1, "Box1",
"Surface", "FacesList", 1, "12", "Line", 1,
"Polyline1", "Point", 2, "Point1", "Point2"

<NumGeomTypes>

Type: <int>

Number of different geometry types (volume, surface, line, point) plotted on at the same time.

<GeomTypeData>

<GeomType>, <ListType>, <NumIDs>, <ID>, <ID>, ...)

<GeomType>

Type: <string>

Possible values are "Volume", "Surface", "Line", "Point".

<ListType>

Type: <string>

Possible values are "ObjList", or "FacesList".

These are used for the GeomType of "Line" or "Point".

<NumIDs>

Type: <int>

Number of IDs or object names that will follow.

<ID>

Type: <int> or <string>

ID of a face or name of an object, line, or point on which to plot.

<FilterBoxArray>

Array of names of objects to use to restrict the plot range.

Array(<NumFilters>, <ObjName>, <ObjName>, ...)

Example:Array(1, "Box1")
Example: Array(0) no filtering

<PlotOnPointSettings>

Array("NAME:PlotOnPointSettings",

"PlotMarker:=", <bool>,
"PlotArrow:=", <bool>)

<PlotOnLineSettings>

Array("NAME:PlotOnLineSettings",

Array("NAME:LineSettingsID",
"Width:=", <int>,
"Style:=", <string>),
"IsoValType:=", <string>,
"ArrowUniform:=", <bool>,
"NumofArrow:=", <int>)

Style

Possible values are: "Cylinder", "Solid", "Dashdash", "Dotdot", "Dotdash"

IsoValType

Possible values are "Tone", "Fringe", "Gourard"

<PlotOnSurfaceSettings>

Array("NAME:PlotOnSurfaceSettings",
"Filled:=", <bool>,
"IsoValType:=", <string>,
"SmoothShade:=", <bool>,
"AddGrid:=", <bool>,
"MapTransparency:=", <bool>,
"Transparency:=", <doubl.e>,
"ArrowUniform:=", <bool>
"ArrowSpacing:=", <double>
"GridColor:=", Array(<int>, <int>, <int>)

IsoValType

Possible values are "Tone", "Line", "Fringe", "Gourard"

GridColor

Array containing the R, G, B components of the color. Components should be in the range 0 to 255.

<PlotOnVolumeSettings>

Array("NAME:PlotOnVolumeSettings",
"PlotIsoSurface:=", <bool>,
"CloudDensity:=", <double>,
"PointSize:=", <int>,
"ArrowUniform:=", <bool>,
"ArrowSpacing:=", <double>)

Python Example – E Magnitude Field Plot:

   oModule.CreateFieldPlot(
   [
      "NAME:Mag_E1",
      "SolutionName:="      , "Setup1 : LastAdaptive",
      "QuantityName:="      , "Mag_E",
      "PlotFolder:="        , "E Field1",
      "UserSpecifyName:="   , 0,
      "UserSpecifyFolder:=" , 0,
      "IntrinsicVar:="      , "Freq='1GHz' Phase='0deg'",
      "PlotGeomInfo:=", [1  , "Surface", "FacesList", 1, "7"],
      "FilterBoxes:=", [0],
      [
         "NAME:PlotOnSurfaceSettings",
         "Filled:="         , False,
         "IsoValType:="     , "Fringe",
         "SmoothShade:="    , True,
         "AddGrid:="        , False,
         "MapTransparency:=", True,
         "Transparency:="   , 0,
         "ArrowUniform:="   , True,
         "ArrowSpacing:="   , 0.100000001490116,
         "GridColor:="      , [255, 255, 255]
      ]
   ], "Field")

Electron Density Field Plot:

   oModule = oDesign.GetModule("FieldsReporter")
   oModule.CreateFieldPlot(
      [
         "NAME:Electron_Density3",
         "SolutionName:="         , "AIR : RFDischarge",
         "UserSpecifyName:="      , 0,
         "UserSpecifyFolder:="    , 0,
         "QuantityName:="         , "Electron_Density",
         "PlotFolder:="           , "RF Discharge Fields",
         "StreamlinePlot:="       , False,
         "AdjacentSidePlot:="     , False,
         "FullModelPlot:="        , False,
         "IntrinsicVar:="         , "Freq=\'0.20000000000000001GHz\'
                                    GasPressure=\'0.02kPascal\'",
         "PlotGeomInfo:="         , [1,"Surface","FacesList",1,"48"],
         "FilterBoxes:="          , [0],
         [
            "NAME:PlotOnSurfaceSettings",
            "Filled:="            , False,
            "IsoValType:="        , "Tone",
            "AddGrid:="           , False,
            "MapTransparency:="   , True,
            "Refinement:="        , 0,
            "Transparency:="      , 0,
            "SmoothingLevel:="    , 0,
            "ShadingType:="       , 0,
            [
               "NAME:Arrow3DSpacingSettings",
               "ArrowUniform:="   , True,
               "ArrowSpacing:="   , 0,
               "MinArrowSpacing:=", 0,
               "MaxArrowSpacing:=", 0
               "GridColor:="      , [255,255,255]
            ],
         ],
      "EnableGaussianSmoothing:=" , False,
      "SurfaceOnly:="             , False
   ], "Field")

HFSS Multipaction SEY Plot

# ------------------------------------------

# Script Recorded by Ansys Electronics Desktop Version 2025.2.0

# 15:36:54 Jan 15, 2025

# ------------------------------------------

import ScriptEnv

ScriptEnv.Initialize("Ansoft.ElectronicsDesktop")

oDesktop.RestoreWindow()

oProject = oDesktop.SetActiveProject("JPL_coax_r251")

oDesign = oProject.SetActiveDesign("Coaxial_7-8")

oModule = oDesign.GetModule("FieldsReporter")

oModule.CreateFieldPlot(

[

"NAME:SEY_Plot1",

"SolutionName:=" , "300MHz_low : Power",

"UserSpecifyName:=" , 0,

"UserSpecifyFolder:=" , 0,

"QuantityName:=" , "Unknown",

"PlotFolder:=" , "SEY_Plot",

"StreamlinePlot:=" , False,

"AdjacentSidePlot:=" , False,

"FullModelPlot:=" , False,

"IntrinsicVar:=" , "PowerMultiplier=\'250\' Time=\'0s\'",

"PlotGeomInfo:=" , [1,"Surface","FacesList",4,"16","17","18","24"],

"FilterBoxes:=" , [0],

[

"NAME:PlotOnSurfaceSettings",

"Filled:=" , False,

"IsoValType:=" , "Tone",

"AddGrid:=" , False,

"MapTransparency:=" , True,

"Refinement:=" , 0,

"Transparency:=" , 0,

"SmoothingLevel:=" , 0,

"ShadingType:=" , 0,

[

"NAME:Arrow3DSpacingSettings",

"ArrowUniform:=" , True,

"ArrowSpacing:=" , 0,

"MinArrowSpacing:=" , 0,

"MaxArrowSpacing:=" , 0

],

"GridColor:=" , [255,255,255]

],

"EnableGaussianSmoothing:=", False,

"SurfaceOnly:=" , False,

"QuantityName:=" , "QuantityName_SecondaryEmission",

"PlotFolder:=" , "SEY_Plot",

"IntrinsicVar:=" , "PowerMultiplier=\'250\' Time=\'0s\'"

], "SecondaryEmission")