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

Hull and Outfitting

PML Triggers

  • Last UpdatedJan 07, 2026
  • 1 minute read

There is PML based trigger mechanism meant to replace the legacy Vitesse trigger functionality. The PML triggers operate on the same events as the Vitesse triggers and are named as the Vitesse triggers but with underscores removed and with "pre"/"post" appended as suffix to the trigger name. For example, the Vitesse trigger trig_draft_init.py file (containing both pre and post functions) is replaced by two PML function files trigdraftinitpre.pmlfnc and trigdraftinitpost.pmlfnc. The PML triggers should be located somewhere in the PMLLIB directory structure as for any other ordinary PML function. As for Vitesse triggers, PML triggers should return, ok, abort or override explicitly given as a string (se example below). The presence of a PML trigger overrules the corresponding Vitesse trigger which becomes obsolete and not considered for execution. A Vitesse trigger is considered for execution only if a corresponding PML trigger is not found. When developing PML triggers, ensure the pml.index file (in PMLLIB) is updated as expected by the pml rehash command followed by restart of the relevant application module. Vitesse triggers with arguments of another type than the basic data types (string, integer, real) are not possible to replace by a PML trigger. for example, the Vitesse trigger trig_draft_property_edit has an argument of the type Model and the system will thereby not make any attempts to find a corresponding PML trigger.

Example of PML trigger

define function !!trighullppanstorepost(!panelName is STRING) is STRING

!panel = !!MyGetPanel.panel(!panelName)

!statusDefinitions[1] = /PanelStatus

!statusValues = !panel.attribute('STVVAL', !statusDefinitions)

if (!statusValues.unset()) then

!!MyStatMgr.confirmUnset()

return 'ABORT'

endif

!statusValue = !statusValues[1].name

if (!statusValue eq '/PanelApproved') then

!!MyStatMgr.confirmApproved()

return 'ABORT'

else

!!MyStatMgr.confirmNotApproved()

return 'OK'

endif

endfunction

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