Graphic Item Functions

Help Contents

Introduction

Graphic Item Functions allow Operator Actions, executed in a Graphic Page, to interact with items on the page.

Using Graphic Item Functions you can:

Locating Graphic Items

All graphic items have Id and Label properties:

Properties window showing the shape id and user defined label

The graphic editor automatically assigns a value to the Id property. You can use any string value for the Label property.

Most Graphic Item Functions use an ItemId parameter to indicate which graphic item to interact with. When a Graphic Item function runs, the function will try to find a graphic item from the ItemId parameter as follows:

  1. The first graphic item with a matching Label value is used.
  2. If there is no matching Label, the first graphic item with a matching Id value is used.
  3. If no graphic item is found, a runtime error is reported.

We recommended you always use the Label property to select graphic items.

Note: Certain edit operations can change the Id of a shape. For example:


Graphic Item Functions

These Graphic Item Functions are available for reading and writing graphic item properties:

Get FunctionSet FunctionRelated Data Binding
GraphicItemGetBlink GraphicItemSetBlink DataBindBlink
GraphicItemGetDisableActions GraphicItemSetDisableActions DataBindDisableActions
GraphicItemGetText GraphicItemSetText DataBindText
GraphicItemGetTextStrikeout GraphicItemSetTextStrikeout DataBindTextStrikeout
GraphicItemGetTextUnderline GraphicItemSetTextUnderline DataBindTextUnderline
GraphicItemGetTooltip GraphicItemSetTooltip DataBindTooltip
GraphicItemGetTrendTrackingMode GraphicItemSetTrendTrackingMode
GraphicItemGetTrendXInterval GraphicItemSetTrendXInterval
GraphicItemGetTrendXOffset GraphicItemSetTrendXOffset
GraphicItemGetVisible GraphicItemSetVisible DataBindVisible

These Graphic Item Functions are available for executing commands on graphic items:

FunctionSummary
GraphicItemTrendNextInterval Moves the X axis of an Embedded Trend to the next interval.
GraphicItemTrendPreviousInterval Moves the X axis of an Embedded Trend to the previous interval.
GraphicItemTrendReset Resets the X Axis of an Embedded Trend back to default values.
HideSelf Hides a pop-up panel.

Gets the value of the DataBindBlink data binding.

Informal syntax:

GraphicItemGetBlink( ItemId )

Formal syntax:

GraphicItemGetBlink( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetBlink function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindBlink data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether the graphic item is blinking (true) or not blinking (false).


GraphicItemGetDisableActions

Gets the value of the DataBindDisableActions data binding.

Informal syntax:

GraphicItemGetDisableActions( ItemId )

Formal syntax:

GraphicItemGetDisableActions( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetDisableActions function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindDisableActions data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether the actions on the item are disable (true) or enabled (false).


GraphicItemGetText

Gets the value of the DataBindText data binding.

Informal syntax:

GraphicItemGetText( ItemId )

Formal syntax:

GraphicItemGetText( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetText function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindText data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a STRING value representing the current text value.


GraphicItemGetTextStrikeout

Gets the value of the DataBindTextStrikeout data binding.

Informal syntax:

GraphicItemGetTextStrikeout( ItemId )

Formal syntax:

GraphicItemGetTextStrikeout( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetTextStrikeout function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindTextStrikeout data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether the text item is drawn with a strikeout effect.


GraphicItemGetTextUnderline

Gets the value of the DataBindTextUnderline data binding.

Informal syntax:

GraphicItemGetTextUnderline( ItemId )

Formal syntax:

GraphicItemGetTextUnderline( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetTextUnderline function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindTextUnderline data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether the text item is drawn with an underline.


GraphicItemGetTooltip

Gets the value of the DataBindTooltip data binding.

Informal syntax:

GraphicItemGetTooltip( ItemId )

Formal syntax:

GraphicItemGetTooltip( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetTooltip function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindTooltip data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a STRING value representing the current tooltip value.


GraphicItemGetTrendTrackingMode

Gets whether the tracking mode of an Embedded Trend is enabled.

Informal syntax:

GraphicItemGetTrendTrackingMode( ItemId )

Formal syntax:

GraphicItemGetTrendTrackingMode( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemGetTrendTrackingMode function finds the graphic trend item using the ItemId parameter. If found, the function returns TRUE if tracking mode is enabled, and FALSE if not enabled.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether tracking mode is enabled.


GraphicItemGetTrendXInterval

Gets the X Axis interval of an Embedded Trend.

Informal syntax:

GraphicItemGetTrendXInterval( ItemId )

Formal syntax:

GraphicItemGetTrendXInterval( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemGetTrendXInterval function finds the graphic trend item using the ItemId parameter. If found, the function returns the current X Axis interval.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a TIME value representing the current X Axis interval.


GraphicItemGetTrendXOffset

Gets the offset (relative to the current time) of the right edge of the X Axis of a trend.

Informal syntax:

GraphicItemGetTrendXOffset( ItemId )

Formal syntax:

GraphicItemGetTrendXOffset( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemGetTrendXOffset function finds the graphic trend item using the ItemId parameter. If found, the function returns the offset (relative to the current time) of the right edge of the X Axis.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a TIME value representing the current offset (relative to the current time) of the right edge of the X Axis.


GraphicItemGetVisible

Gets the value of the DataBindVisible data binding.

Informal syntax:

GraphicItemGetVisible( ItemId )

Formal syntax:

GraphicItemGetVisible( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.

The GraphicItemGetVisible function finds the graphic item using the ItemId parameter. If found, the function returns the value of the DataBindVisible data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

Returns a BOOL value indicating whether the graphic item is visible (true) or hidden (false).


Sets the value of the DataBindBlink data binding.

Informal syntax:

GraphicItemSetBlink( ItemId, Blink )

Formal syntax:

GraphicItemSetBlink( ItemId:=Expression, Blink:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
BlinkBOOLWhether the item will blink (true) or not blink (false).

The GraphicItemSetBlink function finds the graphic item using the ItemId parameter. If found, the function writes the Blink parameter to the DataBindBlink data binding. Writing the value True will make the item blink. Writing the value False will stop the item blinking.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindBlink is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetDisableActions

Sets the value of the DataBindDisableActions data binding.

Informal syntax:

GraphicItemSetDisableActions( ItemId, DisableActions )

Formal syntax:

GraphicItemSetDisableActions( ItemId:=Expression, DisableActions:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
DisableActionsBOOLWhether actions are disabled (true) or enabled (false).

The GraphicItemSetDisableActions function finds the graphic item using the ItemId parameter. If found, the function writes the DisableActions parameter to the DataBindDisableActions data binding. Writing the value True will disable actions on the item. Writing the value False will enable actions on the item.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindDisableActions is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetText

Sets the value of the DataBindText data binding.

Informal syntax:

GraphicItemSetText( ItemId, Text )

Formal syntax:

GraphicItemSetText( ItemId:=Expression, Text:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
TextSTRINGThe new text to display.

The GraphicItemSetText function finds the graphic item using the ItemId parameter. If found, the function writes the Text parameter to the DataBindText data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindText is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetTextStrikeout

Sets the value of the DataBindTextStrikeout data binding.

Informal syntax:

GraphicItemSetTextStrikeout( ItemId, Strikeout )

Formal syntax:

GraphicItemSetTextStrikeout( ItemId:=Expression, Strikeout:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
StrikeoutBOOLWhether the text item should be drawn with strikeout (TRUE) or not (FALSE).

The GraphicItemSetTextStrikeout function finds the graphic item using the ItemId parameter. If found, the function writes the Text parameter to the DataBindTextStrikeout data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindTextStrikeout is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetTextUnderline

Sets the value of the DataBindTextUnderline data binding.

Informal syntax:

GraphicItemSetTextUnderline( ItemId, Underline )

Formal syntax:

GraphicItemSetTextUnderline( ItemId:=Expression, Underline:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
UnderlineBOOLWhether the text item should be drawn with underline (TRUE) or not (FALSE).

The GraphicItemSetTextUnderline function finds the graphic item using the ItemId parameter. If found, the function writes the Text parameter to the DataBindTextUnderline data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindTextUnderline is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetTooltip

Sets the value of the DataBindTooltip data binding.

Informal syntax:

GraphicItemSetTooltip( ItemId, Tooltip )

Formal syntax:

GraphicItemSetTooltip( ItemId:=Expression, Tooltip:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
TooltipSTRINGThe new text to display in the tooltip.

The GraphicItemSetTooltip function finds the graphic item using the ItemId parameter. If found, the function writes the Tooltip parameter to the DataBindTooltip data binding.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindTooltip is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemSetTrendTrackingMode

Sets whether the tracking mode of a trend is enabled.

Informal syntax:

GraphicItemSetTrendTrackingMode( ItemId, TrackingMode )

Formal syntax:

GraphicItemSetTrendTrackingMode( ItemId:=Expression, TrackingMode:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.
TrackingModeBOOLWhether tracking mode is enabled on the trend.

The GraphicItemSetTrendTrackingMode function finds the graphic trend item using the ItemId parameter. If found, the function writes the TrackingMode parameter to embedded trend.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


GraphicItemSetTrendXInterval

Sets the X Axis interval of a graphic trend item.

Informal syntax:

GraphicItemSetTrendXInterval( ItemId, XInterval )

Formal syntax:

GraphicItemSetTrendXInterval( ItemId:=Expression, XInterval:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.
XIntervalTIMEThe new X Axis interval of the trend.

The GraphicItemSetTrendXInterval function finds the graphic trend item using the ItemId parameter. If found, the function writes the XInterval parameter to embedded trend.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


GraphicItemSetTrendXOffset

Sets the offset (relative to the current time) of the right edge of the X Axis of a trend.

Informal syntax:

GraphicItemSetTrendXOffset( ItemId, XOffset )

Formal syntax:

GraphicItemSetTrendXOffset( ItemId:=Expression, XOffset:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.
XOffsetTIMEThe new X Axis offset of the trend.

The GraphicItemSetTrendXOffset function finds the graphic trend item using the ItemId parameter. If found, the function writes the XOffset parameter to embedded trend.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


GraphicItemSetVisible

Sets the value of the DataBindVisible data binding.

Informal syntax:

GraphicItemSetVisible( ItemId, Visible )

Formal syntax:

GraphicItemSetVisible( ItemId:=Expression, Visible:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the item.
VisibleBOOLWhether the item will be displayed (true) or hidden (false).

The GraphicItemSetVisible function finds the graphic item using the ItemId parameter. If found, the function writes the Visible parameter to the DataBindVisible data binding. Writing the value True will display the item. Writing the value False will hide the item.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Note: If the DataBindVisible is configured on a graphic item, any value written by this function will only have a temporary effect. The value will be overwritten by the data binding at the next data refresh.

Return Value

None.


GraphicItemTrendNextInterval

Moves the X Axis of an Embedded Trend to the next time interval.

Informal syntax:

GraphicItemTrendNextInterval( ItemId )

Formal syntax:

GraphicItemTrendNextInterval( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemTrendNextInterval function finds the graphic trend item using the ItemId parameter. If found, the function moves the X Axis of the trend to the next time interval.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


GraphicItemTrendPreviousInterval

Moves the X Axis of an Embedded Trend to the previous time interval.

Informal syntax:

GraphicItemTrendPreviousInterval( ItemId )

Formal syntax:

GraphicItemTrendPreviousInterval( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemTrendPreviousInterval function finds the graphic trend item using the ItemId parameter. If found, the function moves the X Axis of the trend to the previous time interval.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


GraphicItemTrendReset

Resets the X Axis of an Embedded Trend back to its default values.

Informal syntax:

GraphicItemTrendReset( ItemId )

Formal syntax:

GraphicItemTrendReset( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdANY_STRINGThe Label or Id of the trend item.

The GraphicItemTrendReset function finds the graphic trend item using the ItemId parameter. If found, the function resets the X Axis of the embedded trend back to its default values.

If the graphic item is not found a runtime error will be reported. You can detect and handle runtime errors by assigning ENO to a variable in a formal call. For more information see Formal Function Calls.

Return Value

None.


HideSelf

Hides an embedded graphic by setting the value of the DataBindVisible data binding of the embedded graphic to False.

Informal and formal syntax:

HideSelf()

Parameters

None.

The HideSelf function the DataBindVisible data binding of the embedded graphic to False. This has the effect of hiding the embedded graphic.

The HideSelf function does nothing if the code calling the function is run from a top level graphic page.

Return Value

None.


Further Information

Data Bindings

For the different data bindings available on graphic items.

Graphic Editor Toolbar

For the different tools available to edit graphic pages.

Graphic Editor

For information about editing graphic pages in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.