Add Custom Pipe Elbow
Add the ECClass in the Schema
The following procedure details how to add a custom elbow to the OpenPlant Modeler component gallery.- Open the OpenPlant_3D.01.08.ecschema.xml in the class editor and supplement with the OpenPlant_3D_Supplemental_Modeling.01.08.ecschema.xml schema.
- Navigate to the Pipe Elbow class.
- Right click on the Pipe Elbow class and select the Add Derived Class option:
- Add class name and display label according to the angle. For example, add the Name as PIPE_ELBOW_40_Degree and DisplayLabel as Pipe Elbow 40 Degree for 40 degree pipe elbow:
- In the Pipe Elbow class, go to the OpenPlant_Physical Child_classes section. Right click EC_Class_Name and select Add Element option. Add your class name in EC_Class_Name array:
- In the Custom Angle Pipe Elbow class, go to properties and select the Angle property in your class.
- Click Custom Attributes and select the Add/Remove option.
- Add the OpenPlant_Physical_Catalogue_Property_Map attribute from the custom attributes dialog. Make sure to set location as OpenPlant_3D_Supplemental_Modeling.01.08.
- Add Angle as an ECExpression value in the OpenPlant_Physical_Catalogue_Property_Map section. For example, the ECExpression value would be 40 for 40 degree pipe elbow.
- Right click your class and select Custom Attributes > Add/ Remove.
- Add Component Ports Information attribute from custom attribute dialog. Make sure to set location as OpenPlant_3D_Supplemental_Information_3DComponent.
- Add Number of Ports value as 2.
- Right click the Port Type and click Add Element twice.
- Add Port Type[0] value as MAIN_PORT and Port Type[1] value as RUN_PORT
- Save the schema.
Add the required specs
- Open the spec and catalog
.mdb files to add spec records for the 40 degree pipe elbow. For this example
the elbow will be added to the
Example.mdb file located in the following
directory:
Configuration\WorkSpaces\OpenPlantExample\WorkSets\Imperial\Standards\OpenPlant\Specs\
- Open the Elbow table in database and add a new record. Enter available specs for custom angle pipe elbow. Mention same name as in the schema under EC_Class_Name column.
Add button in the Component Gallery
- Open the OPModeler.dgnlib
file in OpenPlant Modeler CONNECT Edition from the following location:
C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\Workspaces\OpenPlantExample\WorkSets\Imperial\Standards\OpenPlant\Modeler\Dgnlibs
- In OpenPlant Modeler, right-click on an open area of the ribbon and select Customize Ribbon.
- Next, expand Piping Gallery Component node then the Elbows node:
- Right click on the Elbows node and select Add New Button.
- In the properties
section, set the button's Label, Description and Icon as required.
Define the Key-in as:
mechaddin place EC_CLASS_NAME dsc=Piping
For example, For the 40 degree pipe elbow the key-in will be defined as:
mechaddin place PIPE_ELBOW_40_DEGREE dsc=Piping
- Click Apply and close the dialog.
- Open a dgn file in the
same workset and open the Elbows component gallery from the Piping ribbon tab.
Notice the custom Elbow 40ยบ is now available for placement.