SurfaceCurrentsCollection

A collection of surface currents results.

Example

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

    -- Obtain the collection of surface currents in the model
    
surfaceCurrents = app.Models[1].Configurations[1].SurfaceCurrents

    -- Display the list of current requests
    
print("The following current requests are available:")
printlist(surfaceCurrents)

    -- Export each of the currents to a file
    
for i, currentData in pairs(surfaceCurrents) do
    print("Exporting " .. currentData.Label)
    filename = "temp_CurrentsFor" .. currentData.Label
    currentData:ExportData(filename, pf.Enums.CurrentsExportTypeEnum.Currents, 2)
end

Usage locations

The SurfaceCurrentsCollection object can be accessed from the following locations:

Property List

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

Property Details

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