PML Function
- Last UpdatedMar 27, 2024
- 1 minute read
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")