How to create a pick list on EC Property using External Datasource definition


  
 Applies To 
  
 Product(s):OpenPlant PID
 Version(s):08.11.10.XXX
 Environment: Windows 7 64 bit
 Area: Customization
 Subarea: Pick Down List
 Original Author:Harpreet Singh, Bentley Technical Support Group
  

Introduction

This article will explain how pick list can be created for an EC Property using external datasource definition. In this article, we will work on creating pick list on DEVICE_TYPE_CODE property on VALVE class where values will be queried from an MDB file. The example of an MDB file is shown below:

Steps to Accomplish

  1. Open class editor and load OpenPlant_PID schema.

  2. Supplement it with OpenPlant_PID_Supplemental_Imperial schema.

  3. Go to VALVE class and switch to properties tab.

  4. Select DEVICE_TYPE_CODE property and add "External Datasource Definition Mapping" custom attribute on it.




    A. Key-in the MDB file name here.

    B. This configuration variable defines the location of database file (*.mdb file) in OPPID and by default it points to C:\ProgramData\Bentley\OpenPlant PID (SS6)\WorkSpace\Projects\<Project_Name>\Dataset\settings folder. You can change the location as per requirement.

    C. Column name in database. You need to right click on Property Mapping field and select "Add Element" option to be able to edit it.

    D. EC Property Name which is mapped with database column.

  5. Now add the Extend Type custom attribute and add 'ShowPickListviewDataBase' value in the Name field as shown below



  6. Save the changes in schema and close the class editor.

Verify the Result

  1. Launch OpenPlant PID and create a new drawing.

  2. Place a valve in the drawing. Placement dialog will open.

  3. Select the device type code property and click drop down button, you will see the list as shown below:



    Note: Default value is HV which is coming from the "Property Custom Attribute" defined on FLUID_REGULATOR" class. Either you can change it or remove it if you don't want this value to be shown up when you place the valve.

See Also

communities.bentley.com/.../20547.how-to-create-drop-down-list-on-ec-property

 

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!