Data Checker Utility User Guide

Embed Size (px)

Citation preview

  • 8/12/2019 Data Checker Utility User Guide

    1/29

    PDMS Data Checker UtilityUser Guide

    Version 11.6

    pdms1160/Data Checker Util ity User Guideissue 090904

  • 8/12/2019 Data Checker Utility User Guide

    2/29

    PLEASE NOTE:

    AVEVA Solutions has a policy of continuing product development: therefore, the

    information contained in this document may be subject to change without notice.

    AVEVA SOLUTIONS MAKES NO WARRANTY OF ANY KIND WITH REGARDTO THIS DOCUMENT, INCLUDING BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE.

    While every effort has been made to verify the accuracy of this document,AVEVA Solutions shall not be liable for errors contained herein or direct,indirect, special, incidental or consequential damages in connection with thefurnishing, performance or use of this material.

    This manual provides documentation relating to products to which you may not haveaccess or which may not be licensed to you. For further information on which Productsare licensed to you please refer to your licence conditions.

    Copyright 1991 through 2004 AVEVA Solutions LimitedAll rights reserved. No part of this document may be reproduced, stored in a retrievalsystem or transmitted, in any form or by any means, electronic, mechanical,photocopying, recording or otherwise, without prior written permission of AVEVASolutions.

    The software programs described in this document are confidential information andproprietary products of AVEVA Solutions or its licensors.

    For details of AVEVA's worldwide sales and support offices, see our website athttp://www.aveva.com

    AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge CB3 0HB, UK

    http://www.aveva.com/engineeringit/world/http://www.aveva.com/engineeringit/world/
  • 8/12/2019 Data Checker Utility User Guide

    3/29

    Contents

    1 Introducing the Data Checker Util ity ...........................................................1-1

    1.1 The Scope of this Guide ............................................................................................1-11.2 How the Guide is Organised.....................................................................................1-1

    2 Running the Checker Uti li ty .........................................................................2-1

    2.1 Accessing the Checker Utility .................................................................................. 2-12.2 Specifying the Elements to be Checked ................................................................... 2-22.3 Selecting the Check Functions to be Carried Out ................................................... 2-32.4 Highlighting Elements in the Graphical View ........................................................ 2-32.5 Running the Checks and Viewing the Results ........................................................ 2-42.6 Navigating to a Checked Element............................................................................2-52.7 Saving Check Results to a File.................................................................................2-52.8 Updating the Available Check Functions ................................................................ 2-6

    3 Adding a New Check Funct ion ....................................................................3-1

    3.1 The Checker Configuration Files ............................................................................. 3-13.2 Rules for Organising Checks into Groups................................................................3-33.3 Check Functions........................................................................................................3-33.4 The Checker Examples ............................................................................................. 3-5

    3.4.1Example 1: Panel Boundary Check................................................................3-53.4.2Example 2: Structural Element Name Check............................................... 3-8

    4 Modifying and Deleting Check Funct ions...................................................4-1

    5 Checker Objects ...........................................................................................5-1

    VANTAGE PDMS Data Checker Utility User Guide contents-iVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    4/29

    Contents

    contents-ii VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    5/29

    1 Introducing the Data Checker Utility

    1.1 The Scope of this Guide

    This guide describes the PDMS Checker utility, which allows dataconsistency checks written in PML to be added to DESIGN quickly andeasily.

    The Checker utility provides:

    A standard user interface for data consistency checks written inPML.

    Standard reporting, to screen and file, of the results of a dataconsistency check.

    The ability to add new checking functions tailored to company orproject working practices.

    Navigation in the database to elements that have failed the checks,by simply picking on part of the on-screen report.

    You can add your own customised check functions to any standard dataconsistency checks provided by AVEVA. A check function is a PMLfunction which tests selected elements in the database, and reports backto the Checker utility whether the element has passed or failed the tests.

    This guide does notdescribe how to program in PML. Before reading thecustomisation chapters of this manual you should be familiar with PMLfacilities, which are described in full in the Plant DesignSoftwareCustomisation Guide.

    1.2 How the Guide is Organised

    Chapter 2 describes how to use the Checker utility to runpredefined data checks.

    Chapter 3 explains, with some examples, how to add new Checkfunctions. It shows the conventions used when programming Checkfunctions in PML.

    Chapter 4 shows how to modify or delete existing Check functions.

    Chapter 5 defines the principal PML objects used by the Checker

    utility.

    VANTAGE PDMS Data Checker Utility User Guide 1-1Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    6/29

    Introducing the Data Checker Utility

    Note: If you simply want to run predefined checks on your design data,you need only refer to Chapter 2.

    If you want to customise the Checker utility by editing the filesdefining available Check functions, you will need to read the wholeof the guide.

    1-2 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    7/29

    2 Running the Checker Utility

    2.1 Accessing the Checker Util ity

    To access the Checker utility from within any DESIGN application,select Utili ties>Data Checkerfrom the application's main menu bar.

    All checking operations are controlled from the resulting form:

    Note: When this form is first displayed, the Check Itemslist willbe empty. The form shown here has had an element added to thelist for illustrative purposes.

    VANTAGE PDMS Data Checker Utility User Guide 2-1Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    8/29

    Running the Checker Utility

    The upper part of the form lets you specify which design elements youwant to check; the lower part lets you select one or more check functions

    to be applied to those elements.

    To run a data check, carry out the operations described in the followingsections.

    2.2 Specify ing the Elements to be Checked

    Use the Checkerform'sAddand Removemenu options to edit the CheckItemslist until it shows those elements that you want to check.

    TheAddmenu options work as follows:

    CE

    Adds the current element (as shown in the Members List).

    CE Members

    Adds all members of the current element, but not the current elementitself.

    Pick

    Lets you add elements by picking them in a graphical view, using any ofthe standard event-driven graphics options.

    Failed List (valid only after a previous data check)Adds all elements which have failed an earlier check, as listed on aChecker Resultsform (see Section 2.5). This option is useful forrechecking items after you have corrected the reasons for their earlierfailure.

    List list_nameAdds all elements in the named list (as created using the application'sUtilities>Listsmenu option). This provides a convenient way of addingelements which conform to a selection rule (for example, 'all pipes with

    pspec eq /A1A'), or which are within a given volume.

    The Removemenu options work as follows:

    Al l

    Empties the Check Itemslist.

    Selected

    Removes all items currently selected in the Check Itemslist.(Pick an element in the list to select it; pick it again to deselect it.)

    CE

    Removes the current element (as shown in the Members List).

    2-2 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    9/29

    Running the Checker Utility

    CE Members

    Removes all members of the current element, but not the current

    element itself.

    Pick

    Lets you remove elements by picking them in a graphical view, using anyof the standard event-driven graphics options.

    List list_nameRemoves all elements in the named list (as created using theapplication's Utilities>Listsmenu option). This provides a convenientway of removing elements which conform to a selection rule (for example,'all pipes with pspec eq /A1A'), or which are within a given volume.

    2.3 Selecting the Check Functions to be Carried Out

    The available check functions are organised into class and groupcategories, simplifying the selection of those most relevant to yourcurrent design activities. Each class of checks represents, typically, amain design discipline; for example, Steelwork, Piping, HVAC, CableTrays, etc. Each class may have one or more groups associated with it,representing more specific features of the design discipline; for example,

    HVAC Branches, HVAC Offsets, etc.First select the required class of checks from the Classesoptions. Thiswill automatically update the Groupsoptions.

    Now select the required group of checks from the Groupsoptions. Thiswill automatically update the Checkslist to show all individual checksapplicable to the chosen class and group.

    From the Checkslist, select one or more checks that are to be made onthe elements in the Check Itemslist. (Pick an element in the list to selectit; pick it again to deselect it.)

    2.4 Highlighting Elements in the Graphical View

    To make it easier to interpret the check results, you can highlightparticular elements in the graphical view. The Highlightmenu optionswork as follows:

    Elements

    Highlights all elements that are in the Check Itemslist. When you selectthis option, you will see a form that lets you choose the highlight colour.

    VANTAGE PDMS Data Checker Utility User Guide 2-3Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    10/29

    Running the Checker Utility

    Note that only elements already in the Drawlistwill be highlighted;elements are not added to the view automatically.

    Passed

    This is an On/Off toggle option. When on (shown by a tick on the menu),all elements which pass subsequent checks will be highlighted. Set therequired highlight colour using the Colours>Passedmenu option.

    Failed

    This is an On/Off toggle option. When on (shown by a tick on the menu),all elements which fail subsequent checks will be highlighted. Set therequired highlight colour using the Colours>Failedmenu option.

    Clear

    Clears either just the current element (CE), or everything in thegraphical view (Al l).

    2.5 Running the Checks and Viewing the Results

    When you have set up the check requirements as described in Sections2.2 to 2.4,click the Checkbutton to carry out the checking operations.The results will be displayed in a Checker Resultswindow, like this:

    2-4 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    11/29

    Running the Checker Utility

    The Passedlist shows all elements that have passed all specified checks.The Failedlist shows all elements that have failed one or more checks,with a brief description of the reason for the failure.

    2.6 Navigating to a Checked Element

    To navigate easily to any element shown in the Passedor Failedlist,click on that item in the list.

    This facility is particularly useful if you want to navigate to a failedelement to correct the reason for the failure before repeating the checks.

    2.7 Saving Check Results to a File

    To save the results of a data check to a file, select one of the following:

    VANTAGE PDMS Data Checker Utility User Guide 2-5Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    12/29

    Running the Checker Utility

    Control>Save>Results

    This saves both the Passed and Failed results. Use the displayed File

    Browserto specify the required file name and its location.

    Control>Save>Failed Reference

    This saves the database references of elements that have failed, togetherwith the checks performed. Use the displayed File Browserto specify therequired file name and its location. This facility makes it easy to recheckthe failed elements later.

    To reload a list of failed element references (saved as in the precedingparagraph), typically following corrections to their data settings, select

    Control>Load>Failed References

    and use the displayed File Browserto specify the required file.

    2.8 Updating the Available Check Functions

    If the list of available checks has been modified during your currentPDMS session (say by editing existing checks or adding new ones), youcan update the Checkerform to show the new options immediately. To do

    so, select Control>Reload Checks.The checks will be reloaded from the relevant default and userdirectories and the Classes, Groupsand Checksoptions will be updatedas appropriate.

    2-6 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    13/29

    3 Adding a New Check Function

    3.1 The Checker Configuration Files

    Although the Checker utility is used by AVEVA to supply standard datachecking facilities in PDMS, its main purpose is to allow users to addtheir own checking tools.

    The utility is controlled by creating configuration files. Theseconfiguration files will tell the system what checks are available, and

    which elements to select for checking. In order to keep standard(AVEVA) and user checking functions separate, they are configured inseparate configuration files.

    The standard AVEVA-supplied checks for PDMS data are configured in afile called com-checks.pmldat, in the product directories. This file mustnotbe modified. (The com prefix shows that this file can, in principle,apply to any PDMS module; in this release, the utility is available fromDesign only.)

    User-supplied checking tools for Design data must be configured in filesnamed des-checks.pmldatin the following directories: The PDMSDFLTS directory holds company-wide checks, which are

    available to all projects.

    The ABCDFLTS directory (where ABC is the project name) holdschecks specific to one project.

    The PDMSUSER directory holds checks specific to a single user.

    Entries in all des-checks.pmldat files available to a user will be combinedtogether on the Checkerform.

    The format of des-checks.pmldat files is described by example below. The

    commands in the file must be valid PML syntax, and all informationmust be provided for each checking function.

    The Checker file in the following example contains two checks:

    The first check identifies any panels that have incorrectly definedboundary curves. It does so by checking for panels having fewerthan three vertices, or zero-length edges.

    VANTAGE PDMS Data Checker Utility User Guide 3-1Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    14/29

    Adding a New Check Function

    The second check looks for structural elements that do not obey anaming convention. The naming convention for this example is that

    the names of all SCTN, PANEL, FRMW and SBFR elements muststart with the first two letters of a UDA :PRODNO, which is set atZONE level.

    - - Dat a f i l e f or Desi gn Checker Ut i l i t y

    - - Comment lines begin - -

    - - Checks f or panel zero l engt h edges, backt r acks, and

  • 8/12/2019 Data Checker Utility User Guide

    15/29

    Adding a New Check Function

    Check.Typesis a list of element types that will be selected for this test.This list will be filtered by the rule in Check.Rule. Only elements fromthe !Check.Types list which obey any conditions specified in !Check.Rulewill be presented to the check function by the Checker utility. Thedatabase reference (DBREF object) of a selected database element ispassed to the check function. The check function must be written tohandle any elements that might be selected and passed to it. If the checkfunction itself fails, this will be reported in the Failedresults list.

    Check.Functionis set to the name of the check function, which mustinclude the at the beginning of the name. This function must exist inthe PMLLIB search path. The filename of the function will be the sameas the function name, but all in lowercase with a .pml filename

    extension; for example, the !!PSNameCheck function will be defined infile psnamecheck.pml.

    Check.Moduleis set to the PDMS module in which this check will run.The Check.FileType = '$1'line is mandatory.The AddCheckerCheck( Check)line adds the details of this check to thelist of available checks.

    3.2 Rules for Organising Checks into Groups

    Any number of Check Classes and Check Groups can be defined, but youmust adhere to the following rule:

    All checks in the same class and group must have exactly the sameselection criteria. !Check.Types must contain the same element list,!Check.Rule must contain the same selection filter, and !Check.Modulemust identify the same module.

    If this rule is broken, then the results from the checker can be unreliable,particularly when multiple checks are run at the same time.

    3.3 Check Functions

    Check functions are PML functions which are called by the Checkerutility. The name of the function is provided to the Checker utility fromthe !Check.Function line in a des-checks.pmldat file.

    A Check function contains PML code, which must follow these rules:

    The function definition must have the following format:

    VANTAGE PDMS Data Checker Utility User Guide 3-3Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    16/29

    Adding a New Check Function

    def i ne f unct i on ! ! Funct i onName ( ! I t emRef i s DBREF,! Check i s CHECKDEFI NI TI ON ) i s CHKRETURN

    !!FunctionName is the name of the function in the !Check.Functionline in a des-checks.pmldat file. The PML file for a check functionwill be in a file named functionname.pml.

    !ItemRef is the name of the variable containing the databasereference of the item to be checked.

    !Check is passed as an argument to the function, although it is notoften used. !Check contains all of the information provided in thedes-checks.pmldat file for this check function.

    These arguments are strictly read only. You should not reset the

    values of these arguments in the function itself.

    The return information from a Check function must be put into aChkReturnobject. The detailed definition of this object is describedlater in this guide.

    A ChkReturn object must be built by the Check function to tell theChecker utility whether the check has passed or failed. It isadvisable to initialise the return value at the start of the Checkfunction:

    ! Resul t = obj ect CHKRETURN( ) Declare the Return object

    ! Resul t . Passed = t r ue Initialise to test passed

    ! Resul t . Messages. cl ear ( ) Initialise the message list

    The remainder of the function performs the required check on theobject passed in the first argument of the Check function. If any testin the function fails, the result must be set to indicate a failure. Thisis done by using the following method:

    ! Resul t . Passed = f al se Indicates a test failure

    ! Resul t . Messages. append( Text of err or message )Add a message to the list of fail

    messagesThe function may stop and return a result after the first error isfound, or it could go on and find other errors and add them to themessage list.

    The result is returned to the Checker utility using the command

    r et ur n !Resul t

    3-4 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    17/29

    Adding a New Check Function

    3.4 The Checker Examples

    3.4.1 Example 1: Panel Boundary Check

    This example checks a panel boundary for zero length edges and missingvertices. The comments in the PML code describe the operations beingperformed.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - - Descri pt i on:

    - - Checks f or bad def i ni t i on of panel boundar y ver t i ces:

    - - Zero l engt h edge; Less t han t hr ee ver t i ces; Panel l oop not f ound

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    def i ne f unct i on ! ! EdgeCheck( ! Panel Ref i s DBREF, ! Check i s CHKDEFI NI TI ON ) i s CHKRETURN

    - - I ni t i al i se Var i abl es

    ! Resul t = obj ect CHKRETURN( )

    ! Resul t . Passed = t r ue

    ! Resul t . Messages. cl ear ( )

    - - Get panel l oop el ement - er r or i f i t does not exi st

    ! Pl oopRef = ( PLOOP 1 OF $! Panel Ref )

    Handl e any

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ' No Panel Loop Found' )

    r et ur n ! Resul t

    endhandl e

    - - get ar r ay of ver t i ces bel ongi ng t o t he panel boundary

    VAR ! Ver t i ces COLLECT ALL PAVE FOR $!Pl oopRef

    ! NumberOf Vert s = ! Vert i ces. si ze( )

    - - Check t hat t her e ar e at l east t hr ee ver t i ces

    i f ( ! Vert i ces .s i ze( ) l t 3) t hen

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ' Onl y ' & ! Ver t i ces. si ze( ) & ' Ver t i ces' )

    r et ur n ! Resul t

    endi f

    VANTAGE PDMS Data Checker Utility User Guide 3-5Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    18/29

    Adding a New Check Function

    - - Add f i r st ver t ex to t he end t o cl ose t he l oop

    ! Ver t i ces. append( ! Ver t i ces[ 1] )

    - - Loop t hr ough ver t i ces and check f or zero l engt h edge

    do ! I ndexVer t s t o ! Number Of Ver t s

    - - get addr ess and posi t i on of t hi s ver t ex and next ver t ex

    ! Ver t ex = ! Ver t i ces[ ! I ndexVer t s] . dbr ef ( )

    ! NextVer t ex = ! Ver t i ces[ ! I ndexVer t s + 1] . dbr ef ( )

    ! Vert exPos = ! Vert ex. Pos

    ! NextVer t exPos = ! NextVer t ex. Pos

    - - cal cul at e di st ance bet ween ver t i ces & t est f or l ess t han 0. 01mm t ol er ance

    VAR ! Di st CONSTRUCT DI ST $!Ver t exPos TO $!Next Ver t exPos

    i f ( ! Di st. r eal ( ) l t 0. 01mm) t hen

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ' Zer o l engt h edge: Ver t ex ' & ! I ndexVer t s. st r i ng( ) )

    ski p

    endi f

    enddo

    - - Return Data

    r et ur n ! Resul t

    endf unct i on

    3-6 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    19/29

    Adding a New Check Function

    The following is a sample report generated by running the precedingpanel boundary check:

    Check Report Fi l e

    Cr eat ed By : M. Bar l owDat e : 10 Oct 97

    Checks Per f or medCl ass : St eel wor kGr oup : Panel s

    [ 1] Check Panel Boundary

    Summar y of Checks

    El ement s passed al l t est s : 8El ement s f ai l ed on or more t est s : 4

    Tot al : 12

    El ement s t hat have passed al l checks : 8

    DEVTEST- C22001- P00001DEVTEST- C22001- P00002DEVTEST- C22001- P00003

    DEVTEST- C22001- P00004DEVTEST- C22001- P00005DEVTEST- C22001- P00006DEVTEST- C22001- P00007DEVTEST- C22001- P00008

    El ement s t hat have f ai l ed one or more checks: 4

    El ement : PANEL 1 of FRMWORK / DEVTEST- C22001Check Panel Boundar y - No Panel Loop Found

    El ement : PANEL 2 of FRMWORK / DEVTEST- C22001Check Panel Boundar y - Onl y 1 Vert i ces

    El ement : PANEL 3 of FRMWORK / DEVTEST- C22001Check Panel Boundary - Zero l ength edge: Ver t ex 2

    El ement : PANEL 8 of FRMWORK / DEVTEST- C22001Check Panel Boundar y - No Panel Loop Found

    End of Check Report Fi l e

    VANTAGE PDMS Data Checker Utility User Guide 3-7Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    20/29

    Adding a New Check Function

    3.4.2 Example 2: Structural Element Name Check

    This example checks the names of PANE, SCTN, FRMW and SBFRelements for primary steel ZONES (with FUNC PS). This examplechecks a panel boundary for zero length edges and missing vertices. Thecomments in the PML code describe the operations being performed.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - - Descri pt i on:

    - - Checks that t he f i r st t wo l ett ers of pr i mary st eel el ement names ar e

    - - t he same as the f i r st t wo l ett ers of t he Product i on Number of t hat

    - - ZONE. The Product i on Number i s s t ored i n UDA : PRODNO. A Zone cont ai ni ng

    - - pr i mar y st eel has i t s FUNC at t r i but e set t o ' PS' . Er r or s t est ed:- - Product i on Number UDA not set

    - - Product i on Number UDA i ncor r ect ( l ess t han t wo l ett ers)

    - - Steel work el ement not named

    - - Name of does not begi n wi t h

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    def i ne f unct i on ! ! PSNameCheck ( ! I t emRef i s DBREF, ! Check i s CHKDEFI NI TI ON ) i s CHKRETURN

    - - I ni t i al i se Var i abl es

    ! Resul t = obj ect CHKRETURN( )

    ! Resul t . Passed = t r ue

    ! Resul t . Messages. cl ear ( )

    - - Get Pr oduct i on Number and check t hat i t i s set

    ! ZoneRef = ( ZONE OF $! I t emRef )

    ! Product i onNumber = ! ZoneRef . at t r i but e( ' : PRODNO' )

    i f ( ! Product i onNumber . empt y( ) ) t hen

    ! Resul t . Passed = f al se! Resul t . Messages. append( ' Product i on Number not set f or ' & ! ZoneRef . f l nn)

    r et ur n ! Resul t

    endi f

    - - Check t hat pr oduct i on number has at l east t wo characters

    i f ( ! Pr oduct i onNumber . l engt h( ) l t 2 ) t hen

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ' Product i on Number i ncor r ect f or ' & ! ZoneRef . f l nn)

    r et ur n ! Resul t

    endi f

    3-8 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    21/29

    Adding a New Check Function

    - - Get f i r st t wo charact er s of t he pr oduct i on number

    ! ProdCode = ! Product i onNumber. subst r i ng( 1, 2)

    - - Get name of st eel el ement

    ! Name = ! I t emRef . Name

    - - Test f or unset name - Fi r st char acter wi l l be ' ='

    i f ( ! Name. subst r i ng( 1, 1) eq ' =' ) t hen

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ! I t emRef . Type & ' not named ' )

    r et ur n ! Resul t

    endi f

    - - Test f or f i r st t wo l et t er s of Pr oduct i on number = f i r st t wo l et t er s of name

    i f ( ! Name. subst r i ng( 2, 2) neq ! ProdCode ) t hen

    ! Resul t . Passed = f al se

    ! Resul t . Messages. append( ! I t emRef . Type & ' name does not begi n wi t h ' & ! ProdCode )

    endi f

    - - Return Dat a

    r et ur n ! Resul t

    endf unct i on

    VANTAGE PDMS Data Checker Utility User Guide 3-9Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    22/29

    Adding a New Check Function

    The following is a sample report generated by running the precedingpanel name check:

    Check Report Fi l e

    Cr eat ed By : M. Bar l ow

    Dat e : 9 Oct 97

    Checks Per f or med

    Cl ass : St eel wor k

    Gr oup : Admi ni st r ati on

    [ 1] Check Pr i mary Steel work Names

    Summar y of Checks

    El ement s passed al l t ests : 13

    El ement s f ai l ed one or more t est s : 5

    Tot al : 18

    El ement s t hat have passed al l checks : 13

    PA- C22001- P00002

    PA- C22001- S00001

    PA- C22001- P00003

    PA- C22001- S00003

    PA- C22001- S00004

    PA- C22001- S00005

    PA- C22001- S00006

    PA- C22001- S00007

    PA- C22001- S00008

    PA- C22001- S00009

    PA- C22001- P00005

    PA- C22001- P00006

    PA- C22001- P00007

    El ement s t hat have f ai l ed one or more checks: 5

    El ement : DEVTEST- C22001

    Check Pr i mar y Steel work Names - FRMW name does not begi n wi t h PA

    El ement : DEVTEST- C22001- P00001

    3-10 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    23/29

    Adding a New Check Function

    Check Pr i mary St eel wor k Names - PANE name does not begi n wi t h PA

    El ement : DEVTEST- C22001- S00002

    Check Pr i mary St eel wor k Names - SCTN name does not begi n wi t h PA

    El ement : DEVTEST- C22001- P00004

    Check Pr i mary St eel wor k Names - PANE name does not begi n wi t h PA

    El ement : PANEL 5 of FRMWORK / DEVTEST- C22001

    Check Pr i mar y St eel wor k Names - PANE not named

    End of Check Report Fi l e

    VANTAGE PDMS Data Checker Utility User Guide 3-11Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    24/29

    Adding a New Check Function

    3-12 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    25/29

    4 Modifying and Deleting Check Functions

    If any of the information in the des-checks.pmldat configuration file ischanged, or if a check is deleted by removing its entry from the file, itwill be necessary for the checks to be reloaded on each active or saveduser Checker utility form by using the Control>Reload Checksoption.

    The Check functions themselves can be modified by simply editing theCheck function PML file. If the Check function is moved to anotherlocation, it will not be found until users restart PDMS, or the PMLREHASHcommand is used to tell PDMS to rebuild its table of currentlyavailable PML functions.

    VANTAGE PDMS Data Checker Utility User Guide 4-1Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    26/29

    Modifying and Deleting Check Functions

    4-2 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    27/29

    5 Checker Objects

    A ChkReturnobject is returned from a Check function to the Checkerutility to tell the utility whether the element has passed or failed thetest.

    If the check has passed, the .Passedmember will be set to TRUEand thearray of text string messages is initialised as empty.

    If the check has failed, the .Passedmember will be set to FALSEand thearray of text string messages should contain at least one entry.

    - - Def i ne obj ectdef i ne obj ect CHKRETURN

    - - Message Ar r aymember . Messages i s ARRAY- - Passed=TRUE Fai l ed=Fal semember . Passed i s BOOLEAN

    endobj ect- - End of obj ect def i ni t i on

    The Checkobject is the object created in the des-checks.pmldat file toconfigure the Checker utility. It is also passed to the Check function asits second argument.

    - - Def i ne obj ectdef i ne obj ect CHECK

    - - Check Name ( uni que)member . Name i s STRI NG- - Check Cl assmember . Cl ass i s STRI NG

    - - Cl ass Check Typemember . Gr oup i s STRI NG- - Check Descr i pt i onmember . Ti t l e i s STRI NG- - Check Funct i on Namemember . Funct i on i s STRI NG- - Per mi ssi bl e El ement t ypesmember . Types i s STRI NG- - Sel ecti on r ul emember . Rul e i s STRI NG- - Successf ul acti onmember . Passed i s STRI NG- - Fai l ed acti on ( i f none r et ur ned f r om check)

    member . Fai l ed i s STRI NG

    VANTAGE PDMS Data Checker Utility User Guide 5-1Version 11.6

  • 8/12/2019 Data Checker Utility User Guide

    28/29

    Checker Objects

    - - Modul e check i s avai l abl e f or m member . Modul e i s STRI NG

    - - Fi l e t ype (who/ wher e check i s l oaded f r om)member . Fi l eType i s STRI NG

    endobj ect- - End

    5-2 VANTAGE PDMS Data Checker Utility User GuideVersion 11.6

  • 8/12/2019 Data Checker Utility User Guide

    29/29

    IndexAdd menu, 2-2

    Check files

    Directories, 3-1

    Check functions

    Reloading, 2-6

    Check Items list

    Adding/removing entries, 2-2

    Check object, 3-2, 5-1

    Check.Class object member, 3-3

    Check.Function object member, 3-3, 3-4

    Check.Group object member, 3-3

    Check.Module object member, 3-3

    Check.Rule object member, 3-3

    Check.Title object member, 3-2

    Check.Types object member, 3-3

    Checker form, 2-1

    Checker results form, 2-4

    Checker Results form

    Failed list, 2-5

    Passed list, 2-5

    Checks

    Selecting, 2-3

    ChkReturn object, 3-4, 5-1

    Class

    Selecting, 2-3

    com-checks.pmldat files, 3-1

    Configuration files, 3-1, 4-1

    des-checks.pmldat files, 3-1, 4-1

    Failed list, 2-5

    Group

    Selecting, 2-3

    Highlight menu, 2-3

    Passed list, 2-5

    PDMSDFLTS directory, 3-1

    PDMSUSER directory, 3-1

    Project defaults directory, 3-1

    Remove menu, 2-2

    Results

    Reloading, 2-6

    Saving, 2-6

    Viewing, 2-5