View
A 3D model view where results can be plotted.
Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) farField = app.Models["startup"].Configurations[1].FarFields[1] -- Get the first 3D view (which gets created by default when adding a fek model) resultView = app.Views[1] -- Add a far field and duplicate the view resultView.Plots:Add(farField) resultViewCopy = resultView:Duplicate()
Inheritance
Usage locations
The View object can be accessed from the following locations:
- Methods
- View object has method Duplicate().
- ViewCollection collection has method Items().
- ViewCollection collection has method Item(number).
- ViewCollection collection has method Item(string).
- ViewCollection collection has method Add(SolutionConfiguration).
- ViewCollection collection has method Add().
Property List
- Animation
- The graph animation properties. (Read only View3DAnimationFormat)
- Axes
- The axes properties. (Read only View3DAxesFormat)
- Format
- The 3D view properties. (Read only View3DFormat)
- Height
- The height of the window. (Read only number)
- Legend
- The legend range properties. (Read only View3DLegendRangeFormat)
- MeshRendering
- The mesh rendering properties. (Read only MeshRendering)
- SolutionEntities
- The result entities properties. (Read only View3DSolutionEntityFormat)
- Type
- The object type string. (Read only string)
- 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)
Collection List
- Plots
- The collection of 3D results on the view. (Result3DPlotCollection of Result3DPlot.)
Method List
- Close ()
- Close the window.
- Duplicate ()
- Duplicate the 3D view. (Returns a View object.)
- ExportAnimation (filename string, fileformat AnimationFormatEnum, quality AnimationQualityEnum, width number, height number, framerate number)
- Export the view animation to a specified file. The type is determined by the Animation.Type property.
- 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.
- SetViewDirection (direction ViewDirectionEnum)
- Specifies the direction from which the model is viewed, e.g., Isometric, Top, Bottom, Left, etc.
- Show ()
- Shows the view.
- ZoomToExtents ()
- Zoom the content of the window to its extent.
Property Details
- Animation
- The graph animation properties.
- Type
- View3DAnimationFormat
- Access
- Read only
- Axes
- The axes properties.
- Type
- View3DAxesFormat
- Access
- Read only
- Format
- The 3D view properties.
- Type
- View3DFormat
- Access
- Read only
- Height
- The height of the window.
- Type
- number
- Access
- Read only
- Legend
- The legend range properties.
- Type
- View3DLegendRangeFormat
- Access
- Read only
- MeshRendering
- The mesh rendering properties.
- Type
- MeshRendering
- Access
- Read only
- SolutionEntities
- The result entities properties.
- Type
- View3DSolutionEntityFormat
- Access
- Read only
- Type
- The object type string.
- Type
- string
- 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
Collection Details
- Plots
- The collection of 3D results on the view.
Method Details
- Close ()
- Close the window.
- Duplicate ()
- Duplicate the 3D view.
- Return
- View
- The duplicated 3D view.
- ExportAnimation (filename string, fileformat AnimationFormatEnum, quality AnimationQualityEnum, width number, height number, framerate number)
- Export the view animation to a specified file. The type is determined by the Animation.Type property.
- Input Parameters
- filename(string)
- The filename of the animation file without its extension.
- fileformat(AnimationFormatEnum)
- The animation file format specified by the AnimationFormatEnum, e.g. AVI, MOV, MKV or GIF.
- quality(AnimationQualityEnum)
- The export animation quality specified by the AnimationQualityEnum, e.g. High, Normal or Low.
- width(number)
- The export width in pixels of the animation.
- height(number)
- The export height in pixels of the animation.
- framerate(number)
- The frames per second the animation will be exported at.
- Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) farField = app.Models["startup"].Configurations[1].FarFields[1] view = app.Views[1] view.Plots:Add(farField) -- Configure the animation type and speed for the view animation = view.Animation animation.Type = pf.Enums.AnimationTypeEnum.PhiRotate animation.PhiStepSize = 25 -- deg/s -- Export the animation to the current working directory view:ExportAnimation([[temp_startupAnimation]], pf.Enums.AnimationFormatEnum.AVI, pf.Enums.AnimationQualityEnum.Normal, 800, 600, 25)
- 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.
- SetViewDirection (direction ViewDirectionEnum)
- Specifies the direction from which the model is viewed, e.g., Isometric, Top, Bottom, Left, etc.
- Input Parameters
- direction(ViewDirectionEnum)
- The direction specified by ViewDirectionEnum.
- Show ()
- Shows the view.
- ZoomToExtents ()
- Zoom the content of the window to its extent.