Skip to main content

Example: Programmatic Selection of an Element

Product: CODESYS Visualization

This example shows how to use the SelectionManager to programmatically select an element in a visualization.

_example_img_visu_selection_manager.png

Description

In the SelectionExample.project project, in the SelectionHandling program, the SelectionManager button is accessed in order to set an element as selected.

Additional information

The SelectionHandling program evaluates the events of the Up, Down, Left, and Right buttons and Click for the first visualization client.

The SelectNextElement method is used to change the current selection. When the Click button is pressed, a MouseUp event is triggered for the selected element and displayed as a LastClick displayed.

The SelectElementAt function sets the selection to the element whose element ID was entered in the above field.

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.14.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.14.0)

Add-on components

-

Note

_example_icon.png DOWNLOAD Project