Graphic Item Functions

Introduction

Graphic Item functions allow Operator Actions, executed in a Graphic Page, to read and write data binding values of graphic items.

Using these functions you can:

These Graphic Item Functions are supported:

Data BindingGet FunctionSet Function
DataBindBlink GraphicItemGetBlink GraphicItemSetBlink
DataBindDisableActions GraphicItemGetDisableActions GraphicItemSetDisableActions
DataBindText GraphicItemGetText GraphicItemSetText
DataBindTooltip GraphicItemGetTooltip GraphicItemSetTooltip
DataBindVisible GraphicItemGetVisible GraphicItemSetVisible, HideSelf

ItemId Values

Most of the the functions documented here use the ItemId parameter to specify which graphic item to change.

To find the ItemId for a shape on a graphic page:

  1. On the toolbar select the Select Shape Tool Select shape mode.
  2. Select the item you want to obtain the ItemId of.
  3. Read the value from the Id field of the Properties Window:
    Properties window showing the shape id

    Note: The above example shows the ItemId of the shape is 12.


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


Gets the value of the DataBindBlink data binding.

Informal syntax:

GraphicItemGetBlink( ItemId )

Formal syntax:

GraphicItemGetBlink( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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
ItemIdDINTThe Id of the item.

The GraphicItemGetText 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 the runtime error by specifying the ENO parameter in a formal call. For more information see Formal Function Calls.

Return value

Returns a STRING value representing the current text value.


GraphicItemGetTooltip

Gets the value of the DataBindTooltip data binding.

Informal syntax:

GraphicItemGetTooltip( ItemId )

Formal syntax:

GraphicItemGetTooltip( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter in a formal call. For more information see Formal Function Calls.

Return value

Returns a STRING value representing the current tooltip value.


GraphicItemGetVisible

Gets the value of the DataBindVisible data binding.

Informal syntax:

GraphicItemGetVisible( ItemId )

Formal syntax:

GraphicItemGetVisible( ItemId:=Expression )

Parameters

ParameterTypeDescription
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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
ItemIdDINTThe Id of the item.
TextSTRINGThe new value for the item's text.

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 the runtime error by specifying the ENO parameter 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.


GraphicItemSetTooltip

Sets the value of the DataBindTooltip data binding.

Informal syntax:

GraphicItemSetTooltip( ItemId, Tooltip )

Formal syntax:

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

Parameters

ParameterTypeDescription
ItemIdDINTThe Id of the item.
TooltipSTRINGThe new value for the item's 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 the runtime error by specifying the ENO parameter 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.


GraphicItemSetVisible

Sets the value of the DataBindVisible data binding.

Informal syntax:

GraphicItemSetVisible( ItemId, Visible )

Formal syntax:

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

Parameters

ParameterTypeDescription
ItemIdDINTThe 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 the runtime error by specifying the ENO parameter 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.


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 definitions of the terms used in Fernhill SCADA.