Window

A view where results can be plotted.

Example

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

    -- Obtain the 3D view window

windowView3D = app.Views[1]

    -- Resize the window and put it at a convenient location
    
windowView3D:SetSize(512, 512)
windowView3D:SetPosition(25, 25)
    
    -- Change the title 
    
windowView3D.WindowTitle = "3D View for the Example Project"

    -- Export the contents of the window as a PNG to a file
    
windowView3D:ExportImage("temp_Example3DViewImage", "png")
    

Inheritance

The following objects are derived (specialisations) from the Window object:

Property List

Height
The height of the window. (Read only number)
Width
The width of the window. (Read only number)
WindowActive
True if this window is the active window. (Read only boolean)
WindowTitle
The title of the window. (Read/Write string)
XPosition
The X position of the window. (Read only number)
YPosition
The Y position of the window. (Read only number)

Method List

Close ()
Close the window.
ExportImage (filename string, fileformat string)
Export the window image at its same size to a specified file.
ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
Export the window image at the given size to a specified file.
Maximise ()
Maximise the window.
Minimise ()
Minimise the window.
Restore ()
Restore the window.
SetPosition (xposition number, yposition number)
Sets the view position. Note that the view is restored when this function is called.
SetSize (imagewidth number, imageheight number)
Sets the view size. Note that the view is restored when this function is called.
Show ()
Shows the view.
ZoomToExtents ()
Zoom the content of the window to its extent.

Property Details

Height
The height of the window.
Type
number
Access
Read only
Width
The width of the window.
Type
number
Access
Read only
WindowActive
True if this window is the active window.
Type
boolean
Access
Read only
WindowTitle
The title of the window.
Type
string
Access
Read/Write
XPosition
The X position of the window.
Type
number
Access
Read only
YPosition
The Y position of the window.
Type
number
Access
Read only

Method Details

Close ()
Close the window.
ExportImage (filename string, fileformat string)
Export the window image at its same size to a specified file.
Input Parameters
filename(string)
The name of the image file without its extension.
fileformat(string)
The image file format, e.g. jpg, png, pdf, etc.
ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
Export the window image at the given size to a specified file.
Input Parameters
filename(string)
The name of the image file without its extension.
fileformat(string)
The image file format, e.g. jpg, png, pdf, etc.
imagewidth(number)
The export width in pixels.
imageheight(number)
The export height in pixels.
Maximise ()
Maximise the window.
Minimise ()
Minimise the window.
Restore ()
Restore the window.
SetPosition (xposition number, yposition number)
Sets the view position. Note that the view is restored when this function is called.
Input Parameters
xposition(number)
The view X position.
yposition(number)
The view Y position.
SetSize (imagewidth number, imageheight number)
Sets the view size. Note that the view is restored when this function is called.
Input Parameters
imagewidth(number)
The view width in pixels.
imageheight(number)
The view height in pixels.
Show ()
Shows the view.
ZoomToExtents ()
Zoom the content of the window to its extent.