Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Form Variables: PML Variables within a Form

  • Last UpdatedFeb 08, 2023
  • 1 minute read

It is often convenient to store additional information on a form which will not be displayed to the user. 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:

setup 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]

Related Links
TitleResults for “How to create a CRG?”Also Available in