ResultTraceCollection
A collection of 2D graph traces.
Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) app.Views[1]:Close() -- Add a Cartesian graph to the application's collection and obtain -- the trace collection graph = app.CartesianGraphs:Add() traces = graph.Traces -- Add multiple traces to the graph traces:Add(app.Models[1].Configurations[1].FarFields[1]) traces:Add(app.Models[1].Configurations[1].FarFieldPowerIntegrals[1]) traces:Add(app.Models[1].Configurations[1].Power[1]) traces:Add(app.Models[1].Configurations[1].NearFields[1]) -- Print a list of all the traces print("Traces on the graph:") printlist(traces) -- Remove two of the graphs, by name and index traces["FarFields_1"]:Delete() traces[1]:Delete()
Usage locations (collections)
The following objects contain the ResultTraceCollection collection:
Property List
Method List
- Add (result ResultData)
- Adds a result to a graph. (Returns a ResultPlot object.)
- Contains (label string)
- Checks if the collection contains an item with the given label. (Returns a boolean object.)
- Item (index number)
- Returns the ResultTrace at the given index. (Returns a ResultTrace object.)
- Item (label string)
- Returns the ResultTrace with the given label. (Returns a ResultTrace object.)
- Items ()
- Returns a table of ResultTrace. (Returns a List of ResultTrace 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 ResultTrace at the given index in the collection. (Read ResultTrace)
- [string]
- Returns the ResultTrace with the given name in the collection. (Read ResultTrace)
Property Details
Method Details
- Add (result ResultData)
- Adds a result to a graph.
- Input Parameters
- result(ResultData)
- The result to add to the graph.
- Return
- ResultPlot
- The trace on the graph.
- Contains (label string)
- Checks if the collection contains an item with the given label.
- Item (index number)
- Returns the ResultTrace at the given index.
- Input Parameters
- index(number)
- The index of the ResultTrace.
- Return
- ResultTrace
- The ResultTrace at the given index.
- Item (label string)
- Returns the ResultTrace with the given label.
- Input Parameters
- label(string)
- The label of the ResultTrace.
- Return
- ResultTrace
- The ResultTrace with the given label.
- Items ()
- Returns a table of ResultTrace.
- Return
- List of ResultTrace
- A table of ResultTrace.
- 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.