WidthAnnotation

A 2D graph width annotation.

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

graph = app.CartesianGraphs:Add()
farFieldTrace = graph.Traces:Add(app.Models[1].Configurations[1].FarFields[1])
annotations = graph.Annotations

    -- Add a default delta annoation
annotation1 = annotations:AddDeltaAnnotation(farFieldTrace)

    -- Modify the delta annoation
properties = annotation1:GetProperties()
properties.Point2AnnotationType =
        pf.Enums.SinglePointAnnotationTypeEnum.GreatestLocalMinToLeft
properties.Point1RelativeType =
        pf.Enums.AnnotationRelativeTypeEnum.RelativeToGlobalMax
annotation1:SetProperties(properties)

Inheritance

The WidthAnnotation object is derived from the GraphAnnotation object.

Property List

AnnotationRelativeType
For annotations that are relative to other graph positions, this values sets what it is relative to. (Read/Write AnnotationRelativeTypeEnum)
AutoTextEnabled
Toggle between auto text and custom annotation text. (Read/Write boolean)
Label
The object label. (Read/Write string)
OffsetX
Annotation text box offset (pixels) in the x-direction. A positive value moves the annotation to the right, a negative value moves it to the left. If both the OffsetX and OffsetY is zero, it will be placed automatically. (Read/Write number)
OffsetY
Annotation text box offset (pixels) in the y-direction. A positive value moves the annotation to the bottom, a negative value moves it to the top. If both the OffsetX and OffsetY is zero, it will be placed automatically. (Read/Write number)
Point1AnnotationType
The first single point annotation type. (Read/Write SinglePointAnnotationTypeEnum)
Point1PositionHorizontal
First single point horizontal (x) position. (Read/Write number)
Point1PositionVertical
First single point vertical (y) position. (Read/Write number)
Point1RelativeType
For annotations that are relative to other graph positions, this value sets what it is relative to for the first point. (Read/Write AnnotationRelativeTypeEnum)
Point2AnnotationType
The second single point annotation type. (Read/Write SinglePointAnnotationTypeEnum)
Point2PositionHorizontal
Second single point horizontal (x) position. (Read/Write number)
Point2PositionVertical
Second single point vertical (y) position. (Read/Write number)
Point2RelativeType
For annotations that are relative to other graph positions, this value sets what it is relative to for the second point. (Read/Write AnnotationRelativeTypeEnum)
Text
The annotation text. (Read/Write string)
Trace
The ResultTrace of the annotation. (Read/Write ResultTrace)
Type
The object type string. (Read only string)
WidthType
The single point annotation type. (Read/Write AnnotationWidthTypeEnum)

Method List

Delete ()
Delete the annotation.
Duplicate ()
Duplicate the annotation. (Returns a GraphAnnotation object.)
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
GetValues ()
Get table of values associated with the annotation. (Returns a Map of string:Expression object.)
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.

Property Details

AnnotationRelativeType
For annotations that are relative to other graph positions, this values sets what it is relative to.
Type
AnnotationRelativeTypeEnum
Access
Read/Write
AutoTextEnabled
Toggle between auto text and custom annotation text.
Type
boolean
Access
Read/Write
Label
The object label.
Type
string
Access
Read/Write
OffsetX
Annotation text box offset (pixels) in the x-direction. A positive value moves the annotation to the right, a negative value moves it to the left. If both the OffsetX and OffsetY is zero, it will be placed automatically.
Type
number
Access
Read/Write
OffsetY
Annotation text box offset (pixels) in the y-direction. A positive value moves the annotation to the bottom, a negative value moves it to the top. If both the OffsetX and OffsetY is zero, it will be placed automatically.
Type
number
Access
Read/Write
Point1AnnotationType
The first single point annotation type.
Type
SinglePointAnnotationTypeEnum
Access
Read/Write
Point1PositionHorizontal
First single point horizontal (x) position.
Type
number
Access
Read/Write
Point1PositionVertical
First single point vertical (y) position.
Type
number
Access
Read/Write
Point1RelativeType
For annotations that are relative to other graph positions, this value sets what it is relative to for the first point.
Type
AnnotationRelativeTypeEnum
Access
Read/Write
Point2AnnotationType
The second single point annotation type.
Type
SinglePointAnnotationTypeEnum
Access
Read/Write
Point2PositionHorizontal
Second single point horizontal (x) position.
Type
number
Access
Read/Write
Point2PositionVertical
Second single point vertical (y) position.
Type
number
Access
Read/Write
Point2RelativeType
For annotations that are relative to other graph positions, this value sets what it is relative to for the second point.
Type
AnnotationRelativeTypeEnum
Access
Read/Write
Text
The annotation text.
Type
string
Access
Read/Write
Trace
The ResultTrace of the annotation.
Type
ResultTrace
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only
WidthType
The single point annotation type.
Type
AnnotationWidthTypeEnum
Access
Read/Write

Method Details

Delete ()
Delete the annotation.
Duplicate ()
Duplicate the annotation.
Return
GraphAnnotation
The new annotation.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A properties table.
GetValues ()
Get table of values associated with the annotation.
Return
Map of string:Expression
Table of key-value pairs.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(table)
A table of properties defining the new state of the object.