How to Assign level when Pipeline Tag Includes Nominal Diameter in Decimal Value


Applies To 
Product(s):OpenPlant Modeler
Version(s):08.11.09.XXX
Environment: Windows 7 (64 bit)
Area: Settings/Attributes
Subarea: -
Original Author:Rahul Kumar, Bentley Product Advantage Group

To set Component symbology for Mixed Metric Environment where pipeline tag includes Nominal Diameter property which has decimals in OpenPlant Modeler using Named Expression.

Background

OpenPlant component symbology is managed in the typical MicroStation fashion. It is controlled through a combination of Named Expressions (used to read attributes and assign the Element Templates accordingly) and Element Templates (where symbology is defined for the elements identified by the Named Expression).

A modification in ‘Named Expression’ should require for changing the components symbology by pipeline name which can be found under ‘Utilities’ Menu and to customize ‘Element template’ to define the  name and hence color to it under ‘Element’ option.

In OpenPlant Modeler, Sometimes it could be Modeler choice or as per Project specific requirement, it has been envisioned to get pipeline tag which includes NOMINAL_DIAMETER property which also contains a decimal value to it. In Mixed Metric setup, levels do not work correctly with default configuration. A modification in ‘Named Expression’ will allow modeler to place the correct levels by using system.string function. 

Steps to Accomplish

  1. Go to File from Main Menu option and open DGN library files (dgnlib). See image below :



  2. Under Utility Menu, Select Named expression and click on OP_SYMBOLOGY_PIPING. See image below for reference.



  3. Below are the Symbology pasted to copy from here and to get it pasted to its respective Expression’s.  

    OP_SYMBOLOGY_PIPING: 

    "BY_LEVEL_AND_TEMPLATE:" & PIPELINE.UNIT_NAME & "-" & PIPELINE.SERVICE_NAME & "-" & IIF (System.String.IndexOf(System.String.ToString(PIPELINE.NOMINAL_DIAMETER), ".")  < 0, PIPELINE.NOMINAL_DIAMETER, System.String.SubString(System.String.ToString(PIPELINE.NOMINAL_DIAMETER),  0 ,System.String.IndexOf(System.String.ToString(PIPELINE.NOMINAL_DIAMETER), ".") ) & "_" & System.String.SubString(System.String.ToString(PIPELINE.NOMINAL_DIAMETER),  System.String.IndexOf(System.String.ToString(PIPELINE.NOMINAL_DIAMETER), ".")  + 1,  System.String.Length (System.String.ToString(PIPELINE.NOMINAL_DIAMETER)) - System.String.IndexOf(System.String.ToString(PIPELINE.NOMINAL_DIAMETER), ".") - 1))  & "-" & PIPELINE.SPECIFICATION & ":OpenPlant\Piping\" &

        IIF( OPITEM.IsOfClass( "INSTRUMENT", "OpenPlant_3D" ), "Instrument:", 

             IIF( OPITEM.IsOfClass( "CONTROL_VALVE", "OpenPlant_3D" ), "Instrument:",

                  IIF( OPITEM.NOMINAL_DIAMETER <= 4 , "DiameterRange1:",

                       IIF( OPITEM.NOMINAL_DIAMETER > 4 AND OPITEM.NOMINAL_DIAMETER <= 8, "DiameterRange2:",
                            IIF( OPITEM.NOMINAL_DIAMETER > 8 AND OPITEM.NOMINAL_DIAMETER <= 12, "DiameterRange3:",

                                 IIF( OPITEM.NOMINAL_DIAMETER > 12 AND OPITEM.NOMINAL_DIAMETER <= 16, "DiameterRange4:",

                                      IIF( OPITEM.NOMINAL_DIAMETER > 16 AND OPITEM.NOMINAL_DIAMETER <= 20, "DiameterRange5:",

                                           IIF( OPITEM.NOMINAL_DIAMETER > 20, "DiameterRange6:", "Default:" ) ) ) ) ) ) ) ) & "Model"

    Note:Make sure to copy the strings correctly.


  4. Add Symbol sets to System.string. Save each Expression which turns blue. Save option will get enabled once you modify the Expressions: See below for reference.



  5. Launch OpenPlant Modeler and Verify results. See images below: 



    Note - For Existing Pipeline to update the levels, select Pipeline, Run Key-in “bmech rebuild”. This will update the level name.

See Also

communities.bentley.com/.../4870.named-expressions-managing-component-symbology-in-openplant-modeler

See Video

communities.bentley.com/.../273301