Named Expressions: Managing Component Symbology in OpenPlant Modeler


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

Overview

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).

The first step in defining symbology is to add or modify a Named Expression to identify the component set you want to manage. OpenPlant Piping components can be managed based on any attribute (component data) or standard preference (Service, Unit etc.).  Equipment components may only be managed based on component data.  It is strongly recommended that existing Named Expressions be either copied or modified as opposed to creating new ones.  The steps below detail the procedure for assigning the symbology of all Piping, managed by Pipeline.

Defining the Named Expression

  1. Launch OPModeler.DGNlib from your Workspace. (%ProjectName%\Dataset\DGNLib is the default location)
  2. Open the Named Expression dialog from Utilities>Named Expressions.
  3. In the left column, you will see a list of all pre-defined Named Expressions in the DGNLib
  4. In this case, we are going to add to the OP Symobology Piping Expression.
  5. Using the syntax of the existing expressions, add the following line:
    IIF( PIPELINE.NAME = "a" , "ServiceA:",

    **You will have to add an additional closing parenthesis at the end of the expression to accommodate this additional function**

Following the syntax present, the expression should now look like this:

"BY_LEVEL_AND_TEMPLATE:" & PIPELINE.SERVICE_NAME & "-" & PIPELINE.NAME & ":OpenPlant\Piping\" &
   IIF( OPITEM.IsOfClass( "GENERIC_INSTRUMENT", "OpenPlant_3D" ), "Instrument:",
    IIF( OPITEM.IsOfClass( "CONTROL_VALVE", "OpenPlant_3D" ), "Instrument:",
     IIF( PIPELINE.NAME = "a" , "PiplineA:",
      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"

Creating the Element Template

At the end of each clause in the named expression, the item in quotation marks designates the name of the element template that will be used to define the symbology of all elements that match the criteria of the expression.  In this case, I chose the name PipelineA.  Now I need to create an element template corresponding to this.  The following steps detail the procedure to do this.

See Also

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server

Comments or Corrections?

Bentley's Product Advantage Group requests that you please submit any comments you have on this Wiki article in the "Comments" area below. THANK YOU!