Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
AutoPLANT | OpenPlant | PlantWise
  • Product Communities
  • More
AutoPLANT | OpenPlant | PlantWise
AutoPLANT | OpenPlant | PlantWise Wiki OPPID - Tag Expression and results
    • Sign in
    • -AutoPLANT | Bentley Raceway and Cable Management | OpenPlant | PlantWise Wiki
      • -OpenPlant
        • +CONNECT Services - OpenPlant
        • +Example Configuration - CONNECT Edition
        • +Installations - OpenPlant CONNECT Edition Applications
        • +OpenPlant Download Links & Videos
        • OpenPlant Product Compatibility
        • +OpenPlant Modeler CONNECT
        • +OpenPlant PID CONNECT
        • +OpenPlant Isometrics Manager CONNECT
        • +OpenPlant Orthographics Manager CONNECT
        • +OpenPlant Support Engineering CONNECT
        • +OpenPlant Project Administrator CONNECT
        • +OpenPlant CONNECT Edition-PlantSight Integration
        • +OpenPlant Modeler v8i
        • +OpenPlant Isometrics Manager v8i
        • +OpenPlant Project Administrator v8i
        • -OpenPlant PID v8i
          • -Application Solutions - OPPID
            • +Brief Notes - OPPID
            • +Conversion - OPPID
            • +ECProperties - OPPID
            • +Issues and Workarounds - OPPID
            • +Logging/Debug - OPPID
            • +ProjectWise - OPPID
            • +Reports - OPPID
            • +Setup - OPPID
            • -Tag Format - OPPID
              • How to Edit Associated Item - PLANT AREA Field Properties
              • How to Include Suffix Property in Instrument Tag and Populate it in Database
              • How to Setup Instrument Tag to Be Unique in Project Database
              • How to Setup Tag to be Non-Unique
              • Inline Component Tag From Pipeline Tag
              • -OPPID - Tag Expression and results
                • OPPID - Alternate Tags Expressions
              • OPPID – How to extend the Tag Number property uniqueness check
              • To Fix Grayed out Associated Property Field in OPPID
              • To Resolve Error of Double Tagging Name in Pipeline
            • +Upgrade Information OPPID
          • +Class Editor - OpenPlant PID
          • +Customization - OpenPlant PID
          • +Database - Plant Project
          • +Properties - OpenPlant PID
          • +Release Notes - OpenPlant PID
          • +Training - OpenPlant PID
          • +White Papers/Guidelines - OPPID
        • +OpenPlant Orthographics Manager v8i
        • +OpenPlant Support Engineering v8i
        • +OpenPlant ModelServer v8i
        • +OpenPlant Reporting v8i
        • How to Connect with Bentley Technical Support Team using Microsoft Teams
        • How to Connect with Bentley Technical Support Team using Microsoft Teams via Browser
      • +Bentley AutoPLANT
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
    • How to Associate the Specification Based on Service in OpenPlant Modeler Connect

     
     Questions about this article, topic, or product? Click here. 

    OPPID - Tag Expression and results

    Applies To 
    Product(s): OpenPlant PID
    Version(s): 08.11.10.XXX (SS5) | 08.11.11.XX (SS6)
    Environment:  Windows 7/8.1/10 (64 bit)
    Area:  Customization
    Subarea:  Tag
    Original Author: Steven Morrow

    Background

    In this article, we will discuss different Tag number parsing and the results. These are defined in the OpenPlant_Supplemental_Tagging schema.

    Steps To Accomplish

    1. Launch class editor and load OpenPlant.01.07 schema. This schema is generally located in C:\ProgramData\Bentley\OpenPlantPID (SS6)\WorkSpace\OPPID\schemas folder.

    2. Supplement it with OpenPlant_Supplemental_Tagging schema. This is a project specific schema and generally located in C:\ProgramData\Bentley\OpenPlantPID (SS6)\WorkSpace\Projects\OPPID_Metric\Dataset\schemas folder.

    3. Locate the class for which you want to modify the tag format. For example, PIPING_NETWORK_SYSTEM.



    4. Switch to properties tab and select NAME property.



    5. Tag format is defined in the form of EC expression and Parser Expression as shown below in Calculated ECProperty Specification custom attribute.

    Similarly, tag format for any class can be added/modified. Below are some samples for EC expression as well as corresponding parser expressions.

    Class

    ANNOTATION_COMPONENTS

    ECExpression

    this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.DEVICE_TYPE_CODE & "-" & this.NUMBER

    ParserRegularExpression

    ^[?\w]*-(?<DEVICE_TYPE_CODE>[?\w]*)-(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    A1-SP-0001

     

    Class

    EQUIPMENT

    ECExpression

    this.DEVICE_TYPE_CODE & "-" & this.NUMBER

    ParserRegularExpression

    ^(?<DEVICE_TYPE_CODE>.*)-(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    PMP-0001

     

    Class

    FLUID_REGULATOR

    ECExpression

    this.DEVICE_TYPE_CODE & "-" & this.NUMBER

    ParserRegularExpression

    ^(?<DEVICE_TYPE_CODE>.*)-(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    HV-0001

     

    Class

    INSTRUMENT

    ECExpression

    this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.DEVICE_TYPE_CODE & "-" & this.NUMBER

    ParserRegularExpression

    ^[?\w]*-(?<DEVICE_TYPE_CODE>[?\w]*)-(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    A1-FT-0001

     

    Class

    INSTRUMENT_LOOP/LOOP

    ECExpression

    this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.DEVICE_TYPE_CODE & "-" & this.NUMBER

    ParserRegularExpression

    ^[?\w]*-(?<DEVICE_TYPE_CODE>[?\w]*)-(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    A1-L-0001

     

    Class

    NOZZLE

    ECExpression

    this.GetRelatedInstance("EQUIPMENT_HAS_NOZZLE:1:EQUIPMENT, DEVICE_TYPE_CODE:?").DEVICE_TYPE_CODE & "-" & this.GetRelatedInstance("EQUIPMENT_HAS_NOZZLE:1:EQUIPMENT, NUMBER:?").NUMBER & "-" & this.DEVICE_TYPE_CODE & this.NUMBER

    ParserRegularExpression

    ^[?\w]*-[?\w]*-(?<DEVICE_TYPE_CODE>.)(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    PMP-0001-N-1

     

    Class

    PIPING_NETWORK_SYSTEM

    ECExpression

    this.UNIT_NAME & "-" & this.SERVICE_NAME & "-" & this.NUMBER & "-" &  this.SPECIFICATION

    ParserRegularExpression

    ^[?\w]*-[?\w]*-(?<NUMBER>[?\w]*)-(?<SPECIFICATION>.*)|(?<NUMBER>.*)

    Result

    U1-Oil-0001-Ductile

    Copy and paste table below to add new table.

    Class

    Any class

     Comment

     This simple example checks to see if it's an email address, there are many ways to do it.  This is a simple example looking for any characters, and seperated by an "@" symbol

    ECExpression

    this.AccountName&"-"&this.Company

    ParserRegularExpression

    ^(?<AccountName>[A-Z0-9._%+-]*)@(?<Company>[\w]*).

    Result

    Bentley_Software1234@bentley_systems.com

     

    Class

    Any property example

     Comment

    this will look for digits and then parse out the " inches character.  Example Size=12" would parse to Size=12 (had this request for annotation purposes, and they didn't want inches shown.  Note: the value must be followed by a " inches character.

    ECExpression

    this.Size

    ParserRegularExpression

    ^(?<SIZE>[\d]{1,3})"

    Result

    1 or 12 or 123

    Class PIPING_NETWORK_SYSTEM
    Comment This allows for a Pipeline tag of Area-Service-Design Size-Specification-Number where the Design Size has the "inch" mark on the size value. In the parser expression note the /" (Forward Slash and Inch mark in the section for DESIGN_SIZE
    ECExpression this.AREA_NAME & "-" & this.SERVICE_NAME & "-" & this.DESIGN_SIZE & "-" & this.SPECIFICATION & "-" & this.NUMBER
    Parser Regular Expression

    ^(?<AREA_NAME>[?\w]*)-(?<SERVICE_NAME>[?\w]*)-(?<DESIGN_SIZE>[?\w/"]*)-(?<SPECIFICATION>.*)-(?<NUMBER>[?\w]*)

    Result 10-STM-4"-CS150-2222

     

     

     

    Class PIPING_NETWORK_SYSTEM
    Comment A tag format where the first value is SERVICE and SERVICE has spaces in the value. The SERVICE property is an Associated Item so it must be stripped out.
    ECExpression this.SERVICE & "-" & this.NUMBER & "-" & this.SUFFIX
    Parser Regular Expression

    ^[?\w\s]*-(?<NUMBER>.*)-(?<SUFFIX>.*)

    Result

    CM F-1234-1

     

    Class FLUID_REGULATOR
    Comment This example is for tag format without delimiter but with a character limit defined in the parser expression.
    ECExpression this.PLANT_AREA & this.DEVICE_TYPE_CODE & this.NUMBER
    Parser Regular Expression

    ^(?<PLANT_AREA>[a-zA-Z0-9]{1,2})(?<DEVICE_TYPE_CODE>[a-zA-Z]{1,2})(?<NUMBER>.*)|(?<NUMBER>.*)

    Result

    A1HV1234

     

    Class VALVE
    Comment

    This allows for tag format without a delimiter and an unknown number of alpha characters

    in the first property (Device Type Code) of the expression.

    ECExpression this.DEVICE_TYPE_CODE & this.NUMBER
    Parser Regular Expression ^(?<DEVICE_TYPE_CODE>[\D]*)(?<NUMBER>.*)
    Result V1234 and HV1234 and HVG1234567

    Class EQUIPMENT
    Comment

    This example is for Equipment tag format Plant area- Device type code-Number(SUFFIX optional) with no limit in parser expression.

    ECExpression this.PLANT_AREA & "-" & this.DEVICE_TYPE_CODE & "-" & this.NUMBER & IIF(this.SUFFIX = "", "", this.SUFFIX)
    Parser Regular Expression ^[?\w]*-(?<DEVICE_TYPE_CODE>[^-]+)-(?<NUMBER>[\d]*)(?<SUFFIX>[?\w]*)
    Result

    A1-PMP-0001 and A1-PMP-0001SU

    See Video :




    • OpenPlant PID
    • Tag Expression
    • Parser Expression
    • result
    • EC Expression
    • Share
    • History
    • More
    • Cancel
    • Stephen Morrow Created by Bentley Colleague Stephen Morrow
    • When: Tue, Sep 6 2011 10:37 AM
    • Nikhil Salunkhe Last revision by Nikhil Salunkhe
    • When: Thu, Aug 16 2018 12:35 PM
    • Revisions: 25
    • Comments: 1
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies