Populate Service Code in Pipeline Based on Service Description


Applies To
Product(s):OpenPlant Modeler
Version(s):08.11.09.XXX (SS5) | 08.11.11.XX (SS6)
Environment:Windows 7/8.1/10 (64 bit)
Area:Properties
Subarea:External Database Query
Original Author:Harpreet Singh, Bentley Product Advantage Group

Background

User’s requirement is to select service description in create pipeline dialog and pipeline tag should get its corresponding Service code based on description. Below is the picture of access database table.

Steps to Accomplish

  1. Load OpenPlant_3D.01.07 schema and supplement it with OpenPlant_3D_Supplemental_Modeling.01.07 & OpenPlant_3D_Supplemental_ModelingViews.01.07 schemas.

    These schemas are generally located in C:\ProgramData\Bentley\OpenPlantModeler V8i\WorkSpace\Projects\%PROJECT_NAME%\Dataset\schemas folder.

  2. Click the Properties tab and go to SERVICE class.



  3. Switch to Properties tab and select NAME property.



  4. Click Override button to be able to modify this property.



  5. Add EXTERNAL_DATABASE_QUERY custom attribute.



    Refer Fundamentals of External Database Query in OpenPlant Modeler for the steps to add this custom attribute.

  6. Add the values as shown below in the picture.



  7. Add Extend Type custom attribute and give the value as shown below.



  8. Go to Pipeline (PIPING_NETWORK_SYSTEM) class and select SERVICE property.



  9. Override the property and add Calculated ECProperty Specification custom attribute.



  10. Add below expression and other values in the custom attribute as shown below:

    this.GetRelatedInstance("SERVICE_IS_RELATED_TO_NAMED_ITEM:1:SERVICE").NAME

  11. Now select SERVICE_NAME property and Override the property.

  12. Add External DB Query custom attribute on it and give the values as shown below.

  13. Add Extend Type custom attribute on this property now.

  14. In Property Display Status custom attribute change the values from “Show: read-only” to “Show: editable” as shown below.

  15. Now, load “OpenPlant_Supplemental_Tagging” schema in class editor.

  16. Go to PIPING_NETWORK_SYSTEM class and switch to properties tab.

  17. Select SERVICE_NAME property and remove ‘Calculated ECProperty Specification’ custom attribute.

  18. Save all the changes in schema.

  19. Add Connection String Variable in the PCF file as shown.

Verify the Results

  1. Launch OpenPlant Modeler.

  2. In create pipeline dialog, click   button to add new Service.

  3. In the Create Service dialog, select the Service description and save.


  4. You will see the description in association tab.




  5. Now switch to properties tab and select service code from the drop down in Service Name property.




  6. Pipeline tag will be updated with service code.

See Also

communities.bentley.com/.../31250.fundamentals-of-external-database-query-in-openplant-modeler

Comments or Corrections?

Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!