ResultTextBoxCollection

A collection of 2D graph text boxes.

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 shapes collection

graph = app.CartesianGraphs:Add()
shapes = graph.Shapes

textBox1 = shapes:AddTextBox("TextBox", 20,30)
textBox1.TextDirection = pf.Enums.TextDirectionEnum.Rotate90
textBox1.BackColour = pf.Enums.ColourEnum.Yellow
textBox1.Width = 100
textBox1.Height = 150

circle1 = shapes:AddCircle(35,30)
circle1.BackColour = pf.Enums.ColourEnum.Cyan

rectangle1 = shapes:AddRectangle(50,30)
rectangle1.BackColour = pf.Enums.ColourEnum.Magenta

Usage locations (collections)

The following objects contain the ResultTextBoxCollection collection:

Property List

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

Method List

AddCircle (posX number, posY number)
Adds a circle to a graph. (Returns a ResultTextBox object.)
AddRectangle (posX number, posY number)
Adds a rectangle to a graph. (Returns a ResultTextBox object.)
AddTextBox (text string)
Adds a text box to a graph. (Returns a ResultTextBox object.)
AddTextBox (text string, posX number, posY number)
Adds a text box to a graph. (Returns a ResultTextBox object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the ResultTextBox at the given index. (Returns a ResultTextBox object.)
Item (label string)
Returns the ResultTextBox with the given label. (Returns a ResultTextBox object.)
Items ()
Returns a table of ResultTextBox. (Returns a List of ResultTextBox 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 ResultTextBox at the given index in the collection. (Read ResultTextBox)
[string]
Returns the ResultTextBox with the given name in the collection. (Read ResultTextBox)

Property Details

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

Method Details

AddCircle (posX number, posY number)
Adds a circle to a graph.
Input Parameters
posX(number)
The x-position of the added circle.
posY(number)
The y-position of the added circle.
Return
ResultTextBox
The circle on the graph.
AddRectangle (posX number, posY number)
Adds a rectangle to a graph.
Input Parameters
posX(number)
The x-position of the added rectangle.
posY(number)
The y-position of the added rectangle.
Return
ResultTextBox
The rectangle on the graph.
AddTextBox (text string)
Adds a text box to a graph.
Input Parameters
text(string)
The text to add to the graph.
Return
ResultTextBox
The text box on the graph.
AddTextBox (text string, posX number, posY number)
Adds a text box to a graph.
Input Parameters
text(string)
The text to add to the graph.
posX(number)
The x-position of the added text box.
posY(number)
The y-position of the added text box.
Return
ResultTextBox
The text box on the graph.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the ResultTextBox.
Return
boolean
The success of the check.
Item (index number)
Returns the ResultTextBox at the given index.
Input Parameters
index(number)
The index of the ResultTextBox.
Return
ResultTextBox
The ResultTextBox at the given index.
Item (label string)
Returns the ResultTextBox with the given label.
Input Parameters
label(string)
The label of the ResultTextBox.
Return
ResultTextBox
The ResultTextBox with the given label.
Items ()
Returns a table of ResultTextBox.
Return
List of ResultTextBox
A table of ResultTextBox.
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 ResultTextBox.