Registering a Form
- Last UpdatedNov 14, 2022
- 1 minute read
The most complete syntax for registering a form is:
!!appFormCntrl.registerForm(!form is FORM, !visibleInApps is ARRAY, !requiredApps is ARRAY, !showOnStartup is BOOLEAN, !showOnSwitch is BOOLEAN)
where !form is the form to be registered, !visibleInApps is an array containing the applications the form should be visible in, !requiredApps is the applications that must have been loaded in order for the form to be displayed, !showOnStartup is whether the form is re-shown on entry to AVEVA E3D Design if it was shown on exit and !showOnSwitch is whether the form is re-shown when switching to an application if it was previously shown in that application.
If !visibleInApps is an empty array, then the form will be visible in all applications.
However, this can be simplified for most forms that do not need all this information stored about them.
The command:
!!appFormCntrl.registerForm(!form is FORM)
registers the form so that it is re-shown on startup if it is shown when AVEVA E3D Design exits. It does not depend on any other applications and its visibility is not otherwise controlled.