Aveva.Pdms.PML.Output Verified Rules

Sometime we need to check elements that use Dynamic Rules and output consistency report to warn users that there is a mismatch in the Template.

This macro outputs .xls(RulesCheck) file with names and errors in DYNAMIC RULEs for EQUI

2016-06-30_175119

PML code:

var !dirname evar pdmsuser
!filename = !dirname + ‘\RuleCheck.xls’
ALPHA LOG /$!filename OVER
$p <xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform&#8221; version=”1.0″>
$p <xsl:template match=”/”>
$p <HTML>
$p <HEAD>
$p <STYLE>
$p .HDR { background-color:bisque;font-weight:bold }
$p </STYLE>
$p </HEAD>
$p <BODY>
$p <TABLE border=”1″>
$p <COLGROUP WIDTH=”100″ ALIGN=”CENTER”></COLGROUP>
$p <COLGROUP WIDTH=”200″ ALIGN=”LEFT”></COLGROUP>
$p <TD CLASS=”HDR”>Name</TD>
$p <TD CLASS=”HDR”>Errors</TD>
$p <xsl:for-each select=”NewDataSet/Table”>
!ceitem = CE
var !arrayPanel coll all EQUI for ce
do !arrayPanelVal values !arrayPanel
$!arrayPanelVal
$p <TR>
$p <TD><xsl:value-of select=”Name”/>
$p <EB><Name>
q name
$p </TD><TD><xsl:value-of select=”Errors”/>
RULE VERIFY ALL
$p </TD></TR>
enddo
$p </RB>
$p </xsl:for-each>
$p </TABLE>
$p </BODY>
$p </HTML>
$p </xsl:template>
$p </xsl:stylesheet>
$!ceitem
ALPHA LOG END
handle any
endhandle

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s