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

AVEVA™ Engineering

Defining a PML Add-in

  • Last UpdatedNov 14, 2022
  • 2 minute read

Each add-in is specified by an add-in definition file, with pathname %PMLUI%\<module>\ADDINS\<addin>, where <module> is the module name e.g. DES, and <addin> is the addin name e.g. MYADDIN. Each line contains a key and description, separated by a colon.

Some keys exist for historic reasons. They were used in older products (for example, PDMS) which used bar menus.

The following can be used by all add-ins.

Key

Description

Name

The unique identifier of the add-in, for example, GEN, DES. This key is compulsory.

Title

Text description of the add-in (if the add-in defines an application, the title appears in the title bar of the main window when the application is loaded).

ShowOnMenu

Determines whether the add-in has an entry on the Applications menu, i.e. whether the add-in defines an application (false by default).

Control

Add-in control object. User-defined object type used to configure and control the add-in, for example, MYADDINCONTROLLER.

A Global variable of the same name is created automatically by the system at module startup.

For example:

!!myAddinController

Methods on this object can be executed at ModuleStartup and at the other application events.

ModuleStartup

Callback run when the module first starts.

For example:

!!myAddinController.initialise()

StartupModify

Name of application to modify and the callback run when an application is first started, separated by a colon.

For example:

EQUI:!!equiAppStartupCall()

SwitchModify

Name of application to modify and the callback to run when the application is switched to, separated by a colon.

For example:

PIPE:!!pipeAppSwitchCall()

SwitchCall

Callback to be run every time the application is switched to.

StartupCall

Callback run when the application first starts.

To make it easier for user-defined add-ins to modify existing applications, it is possible for an add-in to add a startup or switch call to an application. You can do this by adding the lines of the following form to the add-in file.

startupModify: APPNAME: callback

switchModify: APPNAME: callback

where APPNAME is the name of the application to modify and callback is the callback to be assigned to it.

If an application with name APPNAME is not defined, the callback is not run.

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