How to Create Custom Border and Map Custom Property with Database




Applies To 

Product(s):

OpenPlant PID

Version(s):

08.11.10.XXX & Higher

Environment: 

Windows 7/8 (64 bit)

Area: 

Customization

Subarea: 

Custom Component

Original Author:

Nikhil Salunkhe, Bentley Product Advantage Group


Background


In OpenPlant PID, sometimes user wanted to create new custom border and map custom property for their project need. In below Wiki article, we have defined the steps on how to create Custom border and Mapping of custom property.

  1. Add New Border Class
  2. Create new Border in Miscellaneous cell library
  3. Add new property to the custom border
  4. Add Tag sets to the Custom Border
  5. Map added property to the Database

Step to Accomplish 

  1. Add New Border Class
  2. Launch Bentley Class editor.

  3. Open OpenPlant_PID.01.07.ecschema.xml schema and Supplement OpenPlant_PID_Supplemental_Imperial.01.07.ecschema.xml schema







  4. Expand Classes, Go to Border Class , right click, 'Add Derived Class' and fill below data





  5. Right click on new Border 'METRIC_BORDER' class , Add custom attribute, Select Schematic CAD Custom Attribute and see below image with highlighted steps.







  6. Go to Metric Border List, right click on Items, click on 'Add elements', fill below data and save all the changes.





  7. Create New Border in Miscellaneous cell library

  8. Open Miscellaneous.cel, Go to Tools , navigate to Cells and then define cell origin

  9. Place the cell origin in lower left corner of sheet and Select all the elements in title block



  10. Go to Elements, navigate to Cells, Go to 'File', click on 'Attach file' then Select Miscellaneous.cel 







  11. Create new border sheet and fill below data [ MyBorderSheet ]







  12. Launch OPPID and see title sheets.



  13. Add new property to the custom border

  14. Launch Bentley Class editor

  15. Open OpenPlant_PID.01.07.ecschema.xml schema and Supplement OpenPlant_PID_Supplemental_Imperial.01.07.ecschema.xml schema

  16. Expand the Classes node, Search for PID_DOCUMENT , Click on 'Add New Property' (PID CODE), Add 'Category and Hide property' Custom attributes and fill below data.









  17. Save all changes

  18. Launch OpenPlant PID and notice PID_CODE as new property.

  19. Add Tag sets to the Custom Border
  20. Launch OPPID, Open Miscellaneous.cel, Go to Elements, navigate to Tags, select 'Define', Add PID_CODE as tag set and Click Ok









  21. Again, go to Elements, navigate to cells, Select ‘MyBorderSheet’, right click and select 'Open for editing' 





  22. Go to Tools, navigate to 'Text', then go to 'Tags' and Select 'Attach tags'



  23. Attach PID_CODE as tag set in Title sheet 

  24. Map added property to the Database

  25. Go to Project Administrator, navigate to Sample Metric, go to 'Database', click on 'Edit Tables'





  26. Navigate to DOC_REG, click on 'Edit', go to 'Table design' and add PID_CODE Column in DOC_REG







  27. Close all dialog boxes.

  28. Open Class editor, go to Database Mapping, browse to PlantProjectSchema.01.07_AutoPlant_PIW_01.07  and click 'OK'





  29. Go to 'Edit Database Structure', 'Remove' existing database, click on 'Load', fill below data, Define 'Data source' then do 'Test' and click Ok







  30. Go to PID DOCUMENT, navigate to PID_CODE Property, go to Property mapping and click on 'Edit' 





  31. Select DOC_REG and PID_CODE from list.

  32. Launch OPPID, open New Metric Project, Fill PID Document and synchronize 'Drawing to Database' 
     
  33. Launch Data Manager.

  34. Navigate to Tables and notice DOC_REG has new mapped property PID_CODE

    See Also

    stage-communities-bentley2-com.telligenthosting.net/.../edit

    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!