You are currently reviewing an older revision of this page.
To set Component symbology for Mixed Metric Environment where pipeline tag includes Nominal Diameter property which has decimals in OpenPlant Modeler using Named Expression.
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.
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.
http://communities.bentley.com/products/plant/design___engineering/w/plant_design_and_engineering__wiki/4870.named-expressions-managing-component-symbology-in-openplant-modeler
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!