WindowCollection

A collection of all the 3D model views and 2D graphs.

Example

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

    -- Create graphs 
    
farFieldGraph = app.CartesianGraphs:Add()
farFieldGraph.Traces:Add(app.Models[1].Configurations[1].FarFields[1])
nearFieldGraph = app.CartesianGraphs:Add()
nearFieldGraph.Traces:Add(app.Models[1].Configurations[1].NearFields[1])

    -- Create 3D Views
    
view1 = app.Views:Add(app.Models[1].Configurations[1])
view1.Plots:Add(app.Models[1].Configurations[1].FarFields[1])
view2 = app.Views:Add(app.Models[1].Configurations[1])
view2.Plots:Add(app.Models[1].Configurations[1].NearFields[1])

    -- Export all graphs in the 'CartesianGraphCollection'

for index, graph in pairs(app.Windows) do
    graph:Maximise()
    graph:ExportImage("temp_Graph"..index, "pdf")
end

Usage locations

The WindowCollection object can be accessed from the following locations:

Property List

Count
The number of Window 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.)
GetActiveWindow ()
Returns the window which is currently active. (Returns a Window object.)
Item (index number)
Returns the Window at the given index. (Returns a Window object.)
Item (label string)
Returns the Window with the given label. (Returns a Window object.)
Items ()
Returns a table of Window. (Returns a List of Window 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 Window at the given index in the collection. (Read Window)
[string]
Returns the Window with the given name in the collection. (Read Window)

Property Details

Count
The number of Window 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 Window.
Return
boolean
The success of the check.
GetActiveWindow ()
Returns the window which is currently active.
Return
Window
The active window.
Item (index number)
Returns the Window at the given index.
Input Parameters
index(number)
The index of the Window.
Return
Window
The Window at the given index.
Item (label string)
Returns the Window with the given label.
Input Parameters
label(string)
The label of the Window.
Return
Window
The Window with the given label.
Items ()
Returns a table of Window.
Return
List of Window
A table of Window.
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 Window.