Diagrams
User Guide
Diagrams
:
Appendices
:
Diagrams API
:
Adding Custom Calls to Addin Functions Shape’s Context Menu
: PML Function
PML Function
For example, to call a simple PML function that looks like below;
define function !!DiagramsPrint()
$P Hello world!
endfunction
All needed is to set the proper
Action
cell formula. In this case, it will look like below;
define function !!DiagramsPrintParam(!DbRefNum is string)
!a = object DBREF(!DbRefNum)
handle any
endhandle
if (UNDEFINED(!a) or UNSET(!a) or BADREF(!a)) then
$P element not found
return
endif
!n = !a.name
$P The clicked item is $!n
endfunction
In this example, the reference number should be passed to the PML function. This is done by adding
/param=refnum
to the formula, like below;
=QUEUEMARKEREVENT("/module=Diagrams /type=shapecontext /code=PMLFUNC /name=DiagramsPrintParam /param=refnum")
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.