PML Customisation
User Guide
Forms
:
Form Members
: Form Variables: PML Variables within a Form
Form Variables: PML Variables within a Form
It is often convenient to store additional information on a form which will not be displayed to you. This is achieved by defining
form variables
.
These are variables which can be any of the PML data types, including
ARRAYS
and
OBJECTS
. These variables have the same lifetime as the form and are deleted when the form itself is killed.
Form members are defined in just the same way as object members:
layout form !!MyForm...
:
member .MyNumber is REAL
member .MyString is STRING
member .MyArray is ARRAY
:
exit
The value of a form member can be set and used in just the same way as an object member:
!!MyForm.MyNumber = 42
!Text = !This.MyNumber
!ThirdValue = !This.MyArray[3]
In a callback function you can use
!this.
to represent 'this form':
!ThirdValue = !This.MyArray[3]
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.