ViewCollection

A collection of 3D model views.

Example

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

    -- Add a far field to the first 3D view (which gets created from the first configuration
    -- by default) 
    
defaultView = app.Views[1]
defaultView.Plots:Add(app.Models[1].Configurations[1].FarFields[1])

    -- Add a new view for the second configuration to the 'ViewCollection'. Add its far field.
    
secondConfigurationView = app.Views:Add(app.Models[1].Configurations[2])
secondConfigurationView.Plots:Add(app.Models[1].Configurations[2].FarFields[1])

Usage locations

The ViewCollection object can be accessed from the following locations:

Property List

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

Method List

Add (configuration SolutionConfiguration)
Adds a new 3D model view to the collection. (Returns a View object.)
Add ()
Adds a new empty 3D view to the collection. (Returns a View object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the View at the given index. (Returns a View object.)
Item (label string)
Returns the View with the given label. (Returns a View object.)
Items ()
Returns a table of View. (Returns a List of View 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 View at the given index in the collection. (Read View)
[string]
Returns the View with the given name in the collection. (Read View)

Property Details

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

Method Details

Add (configuration SolutionConfiguration)
Adds a new 3D model view to the collection.
Input Parameters
configuration(SolutionConfiguration)
The Configuration that must be displayed.
Return
View
The new 3D model view.
Add ()
Adds a new empty 3D view to the collection.
Return
View
The new 3D view.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the View.
Return
boolean
The success of the check.
Item (index number)
Returns the View at the given index.
Input Parameters
index(number)
The index of the View.
Return
View
The View at the given index.
Item (label string)
Returns the View with the given label.
Input Parameters
label(string)
The label of the View.
Return
View
The View with the given label.
Items ()
Returns a table of View.
Return
List of View
A table of View.
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 View.