EPC-28-AWC2019-PML Quick Tips and Tricks PDF
EPC-28-AWC2019-PML Quick Tips and Tricks PDF
EPC-28-AWC2019-PML Quick Tips and Tricks PDF
• PML 2
• More structured codes (objects, forms, functions)
• PMLLIB Folder
• PML.NET
• More complex and powerful codes
Claim / Unclaim
– Required to change elements in Dabacon DBs
– Implicit / Explicit Claimlist Databases
– Unclaiming Elements
– Claim by “Dead” users
Claim / Unclaim
– Syntax
• 1st part: Action CLAIM / UNCLAIM
• 2nd part: Action Element Ce / “type” / next / prev / last
• 3rd part: Element Hierarchy or Members Hier / mem
• Ex: claim ce hier
• Ex: unclaim pipe mem
• Ex: claim bran
Help pml: $q
– Ex.: claim $q
New / Delete
– Sintaxe:
• Var !membersAaSpec coll all bran mem with matchwild(name of spec of spref,’*Aa*’) for pipe
• Var !pipeElem coll all PIPE with matchwild(name,’*PIPING’) for /SITE1 /SITE2
Time consuming!!
Queries from Collections: Q VAR !pipeElem
Evaluating Collection Arrays: Var !pipeElemName eval name for all from !pipeElem
© 2019 AVEVA Group plc and its subsidiaries. All rights reserved.
TTY Mode
> Faster (much faster!!)
> used in Batch call or CMD
> Doesn’t support graphical interface:
Need to consider the use of
– Forms
HANDLE/ENDHANDLE
–“!!alert.” commands:
statements!
• !!alert.message()
• !!alert.error() !!alert.message(‘Message to User’)
• etc endhandle
➢ Enable that a specific routine starts its execution only by the conclusion of a
preliminary routine
• PML.INDEX
• PML REHASH ALL
• Q EVAR PMLLIB
• Q EVAR PMLUI
© 2019 AVEVA Group plc and its subsidiaries. All rights reserved.
PML Code Types
• Macros
▪ Are not required to be in PMLLIB or PMLUI
▪ Normally make the link between the user and complex codes
▪ Script structure
▪ Call Syntax: $m macroAddress
▪ File Extension: none (but it is a good practice to use .pmlmac)
▪ It can receive parameters:
▪ $m macroAddress parameter1 parameter2 etc
▪ Inside the macro it is possible to receive the input parameters
▪ !para1 = $1
▪ !para2 = $2
▪ Extension: .pmlobj
FORM Gadgets
exit
Constructor Method Definition
define method .formName()
endmethod
▪ Extension: .pmlfrm
▪ TIP: !!PMLFORMS
▪ Extension: .pmlfrm
▪ TIP: !!PMLFORMS
!type = 'PIPE'
!macroAddress = 'c:\aveva\report.txt'
Var !elements coll all $!type for ce
!file = object file(!macroAddress)
!file.writefile('overwrite',!elements)
Syscom 'start $!macroAddress'
!type = 'EQUI'
Var !elements coll all $!type for ce
Do !eachEqui values !elements
markdb
$!eachEqui
!name = name
!name = !name + '-NEW-INFORMATION'
name $!name
Enddo
ABOUT AVEVA
AVEVA is a global leader in engineering and industrial software driving digital transformation across
the entire asset and operational life cycle of capital -intensive industries.
The company’s engineering, planning and operations, asset performance, and monitoring and
control solutions deliver proven results to over 16,000 customers across the globe. Its customers are
supported by the largest industrial software ecosystem, including 4,200 partners and 5,700 certified
developers. AVEVA is headquartered in Cambridge, UK, with over 4,400 employees at 80 locations in
over 40 countries.
aveva.com