Quantcast
Viewing all articles
Browse latest Browse all 16985

Wiki Page: How to Map Custom Properties with Database

Applies To Product(s): OpenPlant PID Version(s): 08.11.10.XXX Environment: Windows 7 64 bit Area: Installation-Configuration Subarea: Database Original Author: Harpreet Singh, Bentley Technical Support Group Background This article will cover the fundamentals of mapping a custom/existing EC property with Database field. 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: Launch Project Administrator. Expand the node. Expand Database node and select ‘Databases’ option. Select PROJDATA in the right window and click Edit Tables option. Select EQUIP table in the below dialog box and click Edit button. In the next dialog, uncheck “Protected” option (if checked) and click Table design. Add a new field VENDOR and set the Data Type to ‘Text’. Save the changes and exit from MS-Access and Project Administrator. B. Add mapping in schema: Steps To Accomplish: Open Class Editor. Go to Database Mapping>Open. In the below dialog box, browse to (Operating System Local_Root)\Bentley\PowerPID (SELECTseries 5)\WorkSpace\Projects\OPPowerPID_Metric\Dataset\schemas directory and click OK. Click ‘Edit Database Structure’ button as shown below. Select the existing Database Mapping and click Remove. Click Load and type PLANTPROJECT_DATABASEMAPPING in the Name field. 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 Select the PROJDATA.mdb file from AutoPLANT project folder C:\ProgramData\Bentley\Plant V8i\Bentley Plant V8i Projects\SAMPLE_METRIC\Projdata and click TEST. Once the structure is loaded, select EQUIPMENT class in Summary tab. Expand EQUIPMENT class and select Vessel class under CONTAINER on the left side of the window. 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: Click the edit button on the property section. In the Edit property mapping dialog, select EQUIP from the drop down menu on the left side. Now select VENDOR from the drop down menu on the right side and click OK. Save the changes and launch OPPID. Verify the result: Place a Vessel in the model and add key-in value in the Vendor Supplied field. Synchronize the drawing with database. Once the drawing is synchronized with the database, launch Data Manager and open the Equipment List view. You will need to add the Vendor field to the view. Once the Vendor field is added, open the view and check the vendor field. Comments or Corrections? Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!

Viewing all articles
Browse latest Browse all 16985

Trending Articles