SelectElement := VISU_SELECTION_NONE;
__QUERYINTERFACE(THIS^, thisAsVisualElem);
CASE dwSelectionType OF
VISU_SELECTION_AT:
IF pPosition^[iPositionIndex] = iElemId THEN
bChangeSelection := TRUE;
END_IF
VISU_SELECTION_ELEMENT:
IF iVisualElement = thisAsVisualElem THEN
ELSE
IF bChangeSelection AND_THEN NOT EffectiveState.bInputDeactivated AND_THEN NOT EffectiveState.bInvisible THEN
pNewSelectionData^.SelectedElement := THIS^;
(* The selectable element sets the new selection TO the next SUB element OR itself in the pNewSelectionData.
In the case of VISU_SELECTION_AT the input variable pPosition should be considered.
pCurrentSelectionData : POINTER TO VisuElemBase.Visu_StructSelectionData;
(* The new selection data*)