FarFieldCollection

A collection of far field results.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

farFieldCollection = app.Models[1].Configurations[1].FarFields

    -- Add the first far field to a Cartesian graph 
    
graph = app.CartesianGraphs:Add()
farFieldTrace1 = graph.Traces:Add(farFieldCollection[1]) -- Index method
farFieldTrace2 = graph.Traces:Add(farFieldCollection["FarFields"]) -- Name method

    -- Add all the far fields in the collection to the 3D view

for index, farFieldData in pairs(farFieldCollection) do
    farFieldPlot = app.Views[1].Plots:Add(farFieldData)
end

Usage locations (collections)

The following objects contain the FarFieldCollection collection:

Property List

Count
The number of FarFieldData items in the collection. (Read only number)
Type
The object type string. (Read only string)

Method List

Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the FarFieldData at the given index. (Returns a FarFieldData object.)
Item (label string)
Returns the FarFieldData with the given label. (Returns a FarFieldData object.)
Items ()
Returns a table of FarFieldData. (Returns a List of FarFieldData object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the FarFieldData at the given index in the collection. (Read FarFieldData)
[string]
Returns the FarFieldData with the given name in the collection. (Read FarFieldData)

Property Details

Count
The number of FarFieldData items in the collection.
Type
number
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the FarFieldData.
Return
boolean
The success of the check.
Item (index number)
Returns the FarFieldData at the given index.
Input Parameters
index(number)
The index of the FarFieldData.
Return
FarFieldData
The FarFieldData at the given index.
Item (label string)
Returns the FarFieldData with the given label.
Input Parameters
label(string)
The label of the FarFieldData.
Return
FarFieldData
The FarFieldData with the given label.
Items ()
Returns a table of FarFieldData.
Return
List of FarFieldData
A table of FarFieldData.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for FarFieldData.