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:
- Collection lists
- Application object has collection Windows.
Property List
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
Property Details
Method Details
- Contains (label string)
- Checks if the collection contains an item with the given label.
- GetActiveWindow ()
- Returns the window which is currently active.
- Return
- Window
- The active window.
- Item (index number)
- Returns the Window at the given index.
- Item (label string)
- Returns the Window with the given label.
- Items ()
- Returns 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.