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 How to Map Custom Properties with Database
    • 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
          • +Class Editor - OpenPlant PID
          • +Customization - OpenPlant PID
          • -Database - Plant Project
            • How to Create a new SQL Server Project and Synchronize OpenPlant PID Projects to it?
            • How do I turn on Number Auto Incrementation of Components on placement?
            • How to Associate an OpenPlant PID Drawing with Another Project
            • How to Change OPPID and Plant Project's Names
            • How to Configure Particular Project to Work in Offline Mode By Default
            • How to Create Custom Border and Map Custom Property with Database
            • How to Get Related Valve Tag in Instrument List in Data Manager
            • How to Map Custom Properties with Database
            • How to Map Input/Output Signal of Instrument in OpenPlant PID
            • How to Select Field Value from External Database PickList
            • How to Setup a Batch Routine to Sync all Drawings in my Project to the Database at one time
            • How To Show Modified Tag Format in Data Manager
            • Importing Data into the Plant Project Database from an Excel Spreadsheet
            • Mapping Plant Project Extended Data Fields to OpenPlant PowerPID
            • OPPID - How to use the Class Editor Mapping Extension for the Plant Project Database
            • OPPID- How to add custom properties to specific piece of equipment or sub class and link to a database
            • Plant Project Database - Class Mapping
            • Plant Project Database - Operations with Schema Mapping and Mapping Add-in panel
            • Plant Project Database - Oracle Install notes
            • Plant Project Database - Relationship Mapping
            • Plant Project Database Tag Format - Tag Codes
            • Setting OpenPlant PowerPID Project with Plant Database Project
            • To Import Modified Tags from Excel in Data Manager
            • Error: "Connection Test Failed" While Mapping SQL Database to Plant Project
            • Calculated EC Property Shows Failure Value in Data Manager
            • "{SERVICE_IS_RELATED_TO_EQUIPMENT(VG.0000003279)} belongs to the ECSchema {ECSchema: PlantProjectSchema.01.04} which is not supported in this connection" Error on Synchronizing from Database to Drawing
            • "Project ID 'XXXX' not found in AT_PROJ.DB3"
            • How to Move a Project Database from One Directory to Another For OPPID
            • Troubleshooting Synchronization issues using Component Selection Tool
          • +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. 

    How to Map Custom Properties with Database

    Applies To
    Product(s): OpenPlant PID
    Version(s): 08.11.10.XXX
    Environment: Windows 7/8.1/10 (64 bit)
    Area: Installation-Configuration
    Subarea: Database
    Original Author: Harpreet Singh, Bentley Product Advantage Group

    Background

    This article will cover the fundamentals of mapping a custom/existing EC property with Database field. 

    To note : the order in which you load the schemas is important.

    You must first load the ...projectname\schemas\PlantProjectSchema01.01_AutoPLANT_PIW01.06 schema file

    followed by the ...projectname\schemas\OpenPlantPID.01.06 schema file

    A.    Add field in Database Table:

    Let’s say we have added a property (VENDOR_SUPPLIED) on the EQUIPMENT class and we want to map it to the database field VENDOR in EQUIP Table.

                            

    Steps To Accomplish: 

    1. Launch Project Administrator.

    2. Expand the <Project Name> node.

    3. Expand Database node and select ‘Databases’ option.

    4. Select PROJDATA in the right window and click Edit Tables option.

    5. Select EQUIP table in the below dialog box and click Edit button. 

    6. In the next dialog, uncheck “Protected” option (if checked) and click Table design. 

    7. Add a new field VENDOR and set the Data Type to ‘Text’. 

    8. Save the changes and exit from MS-Access and Project Administrator. 

    B.    Add mapping in schema:

     Steps To Accomplish: 

    1. Open Class Editor.

    2. Go to Database Mapping>Open.

    3. In the below dialog box, browse to (Operating System Local_Root)\Bentley\PowerPID (SELECTseries 5)\WorkSpace\Projects\OPPowerPID_Metric\Dataset\schemas\PlantProjectSchema01.06_AutoPLANT_PIW01.06 directory and click OK.

    4. Click ‘Edit Database Structure’ button as shown below. 

    5. Select the existing Database Mapping and click Remove.


       
    6. Click Load and type PLANTPROJECT_DATABASEMAPPING in the Name field. 

    7. Select the provider:

      a. For MS-ACCESS database>Microsoft Access Provider
      b. For SQL database> Microsoft SQL Server .Net Provider
      c. For Oracle Database>Oracle.Net Provider
       
    8. Select the PROJDATA.mdb file from AutoPLANT project folder C:\ProgramData\Bentley\Plant V8i\Bentley Plant V8i Projects\SAMPLE_METRIC\Projdata and click TEST. 



    9. Once the structure is loaded, select EQUIPMENT class in Summary tab. 



    10. Expand EQUIPMENT class and select Vessel class under CONTAINER on the left side of the window. 



    11. In the properties tab, scroll down and select VENDOR_SUPPLIED property.



      As highlighted in the picture, it is showing that this property is currently not mapped. If a property is mapped there is a green color drum in front of Property name. Also it shows the mapping in the property section down below:

    12. Click the edit button on the property section. 

    13. In the Edit property mapping dialog, select EQUIP from the drop down menu on the left side. 

    14. Now select VENDOR from the drop down menu on the right side and click OK. 

    15. Save the changes and launch OPPID. 

    Note: Currently mappings are not inherited from the Parent class to child classes, therefore, user need to map the properties at the child classes as well.

    Verify the result: 

    1. Place a Vessel in the model and add key-in value in the Vendor Supplied field. 

    2. Synchronize the drawing with database.

    3. Once the drawing is synchronized with the database, launch Data Manager and open the Equipment List view.

    4. You will need to add the Vendor field to the view.

    5. Once the Vendor field is added, open the view and check the vendor field.


    Case II 

    Background:

    In OpenPlant PID, user wants to have FACILITY property for Flow Element. When user places any flow element on pipeline and synchronizes from drawing to database. User is unable to get that FACILITY input in Data Manager. User’s requirement is to map FACILITY property in Data Manager.

    Steps to Accomplish:

    1. Launch Project Administrator.

    2. Expand Your Project, here Metric project, then Database, go to Databases, select PROJDATA and click on Edit Tables





    3. Select INSTR, go to Edit, click on Table Design, add IFACILITY, Save and click Ok, see below images.







    4. Close Project Administrator.

    5. Launch Class Editor.

    6. Load OpenPlant_PID.01.07.ecschema 



    7. Supplement with OpenPlant_PID_Supplemental_Imperial.01.07.ecschema



    8. Navigate to Flow Element, switch to Properties, click on Add and select New.



    9. Fill below data.



    10. Right click on FACILITY property to add Custom Attribute.



    11. Add Category custom attributes to FACILITY Property.





    12. Fill below Information.



    13. Save all the changes.

    14. Continue Class editor and go to Database Mapping, select open and click OK.





    15. After loading, click on Edit Database Structure in Summary and Remove existing PLANTPROJECT_DATABASEMAPPING.





    16. Now, click on Load



    17. Fill below Data, check Test Connection, click OK and close the dialog.



    18. Now, click on Flow Element, switch to properties, Select FACILITY and click on Edit in Property Mapping Information.






    19. Select INSTR and IFACILITY from the dropdown and click OK.



    20. Save Database Mapping and close Class Editor.



    21. Launch Data Manager.


    22. Expand views and click on Instrument List – Flow Element, right click and select Edit.





    23. Click on Design.



    24. Select IFACILITY field from INSTR Source Table, click on Right Arrow and OK.



    25. Close Data Manager.

    26. Launch OpenPlant PID , Create new file (Metric unit) and place pipeline and flow nozzle.



    27. Synchronize from Drawing to Database.







    28. Verify Instrument List – Flow Element view in Data Manager.



    29. Expand Tables and check INSTR. You can see Facility table and its Input separately in Data Manager.



    See Video

    Also check video for above mentioned workflow.

    See Also

    Comments or Corrections?

    Bentley's Product Advantage Group requests that you please submit any comments you have on this Wiki article in the "Comments" area below. THANK YOU!

    • 08.11.11.xxx
    • PID
    • Property Mapping
    • OpenPlant PID
    • Database Mapping
    • OPPID
    • Class Editor
    • Flow Elements
    • 08.11.10.xxx
    • OpenPLANT PowerPID
    • Project Administrator
    • Database
    • Openplant
    • Share
    • History
    • More
    • Cancel
    • Harpreet Singh Created by Bentley Colleague Harpreet Singh
    • When: Wed, Dec 31 2014 5:37 AM
    • Kestutis Mitkus Last revision by Bentley Colleague Kestutis Mitkus
    • When: Thu, Mar 14 2019 4:28 AM
    • Revisions: 13
    • Comments: 0
    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