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

AVEVA™ Engineering

Form Definition File

  • Last UpdatedOct 29, 2024
  • 2 minute read

Form definitions must be held one per file. The file name must be the form’s name in lowercase with the file extension .pmlfrm. For example, our form !!Hello would be captured in a file called hello.pmlfrm. This definition file should be stored in a directory pointed to by the PMLLIB environment variable. It will then be loaded automatically on execution of the show !!Hello command.

The form definition file contains:

  • The form definition between layout form and exit. This includes the commands which create the form itself, and set its attributes, such as its size and title, the commands which create the gadgets on the form and specify how they are arranged, and the definitions of any variables which are to be members of the form.

  • Any method definitions should follow the exit command, each method beginning with the define method command and ending with endmethod. Methods on forms are just like methods on any other kind of object ‑ refer to Methods on User-Defined Object Types.

  • In particular, it will contain the default constructor method of the form. This is a method with the same name as the form, and no arguments. It is the only method called automatically when the form is loaded, and so it can be used, among other things, to set default values for the gadgets on the form.

  • The form may be given an initialization method, which is run whenever the form is shown (as opposed to when it is loaded). For further information, refer to Form Initialization Callback.

  • No executable statements should appear in the file outside of the form definition or form methods. The effect of misplaced executable statements is indeterminate. You can put comments anywhere in the file.

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