PML Customisation
User Guide
PML Add-ins
: Aveva.Core.PMLPseudos Addin
Aveva.Core.PMLPseudos Addin
Pseudo UDA functionality is available that allows the creation of a link between a UDA and a PML function in LEXICON. All applications (for example, DES) that use the Aveva.Core.PMLPseudos addin are able to calculate the value of the UDA using PML functions on the current element.
The addin is available in Model by default, but it is not loaded by default in other modules. To use this capability in other modules the following string must be added to the <module>Addins.xml file.
<string>Aveva.Core.PMLPseudos<string>
Two UDA properties are available when the pseudo attribute is set to True in LEXICON:
•
Value providing function
•
Value setting function
By default, both UDA properties take the name of PML function as its value.
The value providing function links to an indexed PML function with the current element as a parameter, for example:
define function !!getString(!ce is DBREF) is STRING
return !ce.type
endfunction
The value setting function links to an indexed PML function with the current element and value as parameters, for example:
define function !!setString(!elem is DBREF, !value is REAL
$p !!setString executed with !value
endfunction
Supported types:
•
LOGICAL
•
REAL and array of it,
•
INTEGER and array of it,
•
TEXT and TEXTARRAY,
•
REFERENCE and array of it,
•
DIRECTION
•
ORIENTATION
•
POSITION
Unsupported types:
•
LOGICAL array
•
DATETIME
•
WORD
•
BLOB
Note:
Database Units - For efficiency and consistency all attributes, whether real or pseudo, are handled by the same code within product whenever possible. Dimensioned attribute whose values are stored in the Engineering Database are always returned in Database Units, and this fact is utilised within the attribute handling code. It is therefore essential that dimensioned pseudo attributes are returned in Database units. This can be achieved simply by having:
!result = !value.dbunits()
return !result
as the last two lines of any PML function which is calculating the dimensioned pseudo attribute value.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.