Script

View the completed POSTFEKO automation script.

The completed script.

--[[PATCH ANTENNA ON PLANAR MULTILAYER SUBSTRATE
====================================================================
This script post-process the calculated results of the patch antenna
placed on a planar multilayer substrate.
]]--
app = pf.GetApplication()
app:NewProject()
app:OpenFile("patch_antenna_scripted_model.fek")

-- Add a Cartesian graph
my_graph = app.CartesianGraphs:Add()

-- Add a far field result to a Cartesian graph
my_farfield_trace = my_graph.Traces:Add(app.Models[1].Configurations[1].FarFields[1])

-- Scale the quantity to dB
my_farfield_trace.Quantity.ValuesScaledToDB = true

-- Set the independent axis to Phi
my_farfield_trace.IndependentAxis = "phi"

-- Set the fixed axis to Theta = 30 deg
my_farfield_trace:SetFixedAxisValue("theta",30, "deg")

-- Add the surface currents to the 3D view
this_3Dview = app.Views[1]
my_3Dview_currents_plot = this_3Dview.Plots:Add(app.Models[1].Configurations[1].SurfaceCurrents[1])

-- Scale the quantity to dB
my_3Dview_currents_plot.Quantity.ValuesScaledToDB = true

-- Set the font size of the title
my_graph.VerticalAxis.Title.Font.Size = 14
my_graph.HorizontalAxis.Title.Font.Size = 14

-- Set the font size of the labels
my_graph.HorizontalAxis.Labels.Font.Size = 14
my_graph.VerticalAxis.Labels.Font.Size = 14