Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenPlant | AutoPLANT
  • Product Communities
OpenPlant | AutoPLANT
OpenPlant | AutoPLANT Wiki How to use IIF Condition in EC Expression to Cater multiple Null
    • Sign In
    • -OpenPlant | AutoPLANT Wiki
      • -OpenPlant
        • +CONNECT Services - OpenPlant
        • +Example Configuration - CONNECT Edition
        • +Installations - OpenPlant CONNECT Edition Applications
        • +OpenPlant Download Links & Videos
        • OpenPlant Product Compatibility
        • +OpenPlant Modeler CONNECT
        • +OpenPlant PID CONNECT
        • +OpenPlant Isometrics Manager CONNECT
        • +OpenPlant Orthographics Manager CONNECT
        • +OpenPlant Support Engineering CONNECT
        • +OpenPlant Project Administrator CONNECT
        • +OpenPlant CONNECT Edition-PlantSight Integration
        • -OpenPlant Modeler v8i
          • +Component - OpenPlant Modeler
          • +Drawing Generation- OpenPlant Modeler
          • +Errors, Logs, Messages, Crashes - OpenPlant Modeler
          • +Import/Export- OpenPlant Modeler
          • +Installation - OpenPlant Modeler
          • OpenPlant HVAC-OpenPlant Modeler
          • OpenPlant Modeler [FAQ]
          • +OpenPlant Specification Generator
          • +ProjectWise - OpenPlant Modeler
          • +Properties - OpenPlant Modeler
          • +Release Notes - OpenPlant Modeler
          • +Schema - OpenPlant Modeler
          • -Settings/Attributes - OpenPlant Modeler
            • Creating an Annotation with the EC Annotation Manager
            • How to Change Default Bend Radius for Mitered Bends
            • How to Change the Default Value of Number of Segments for HVAC Mitered Elbow
            • How to change the Maximum Allowed Bend Point Angle for Mitered Pipe Bend
            • How to create a New Property & Make its Field Editable in OpenPlant Modeler
            • How to Create Annotation for Multiple Properties using EC Annotation Manager
            • How to Disable Server Tree Hierarchy in Active Tree of Item Browser
            • How to Display Elevation Differences using EC Annotation in OpenPlant Modeler
            • How to Fix Generic Valve Insertion Issue in OpenPlant Modeler
            • How to Leave Custom Length Value after using Change Spec / Change Size Option
            • How to Make Properties Values Editable in OpenPlant Modeler
            • How To Reduce Printing Time in OpenPlant Modeler
            • How to Remove Trailing Zeros from EC Annotations in OpenPlant Modeler
            • How to Set Default User in OpenPlant Modeler
            • How to Set Default Value of Nested Depth in OpenPlant Modeler
            • How to use IIF Condition in EC Expression to Cater multiple Null
            • +Named Expressions: Managing Component Symbology in OpenPlant Modeler
            • OpenPlant Configuration Variables
            • To Display Tracing on Pipeline in OpenPlant Isometric Manager
            • To Fix or Create New Elbow Radius Entry under AutoFitting Template in OpenPlant Modeler
            • To put Catalogs and Specs in a different folder out of default WorkSpace
          • +Structural Modeling Components (SMC)- OpenPlant Modeler
          • +Tasks - OpenPlant Modeler
          • +Training - OpenPlant Modeler
        • +OpenPlant Isometrics Manager v8i
        • +OpenPlant Project Administrator v8i
        • +OpenPlant PID v8i
        • +OpenPlant Orthographics Manager v8i
        • +OpenPlant Support Engineering v8i
        • +OpenPlant ModelServer v8i
        • +OpenPlant Reporting v8i
        • How to Connect with Bentley Technical Support Team using Microsoft Teams
        • How to Connect with Bentley Technical Support Team using Microsoft Teams via Browser
        • How to get list of installed applications/programs on Windows Machine using Command Prompt.
        • How to get list of Windows Updates installed on the machine using Command Prompt.
        • How to Package WorkSpace to be Shareable to Users for OpenPlant Projects
      • +Bentley AutoPLANT
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
      • Your Feedback is important to us!

     
     Questions about this article, topic, or product? Click here. 

    How to use IIF Condition in EC Expression to Cater multiple Null


    Applies To 
    Product(s): OpenPlant Modeler CONNECT Edition
    Version(s):

    10.10.00.72

    Environment:  Windows 10 (64-bit)
    Area:  OpenPlant Project Administrator
    Subarea:  Schema Customization
    Original Author: Deepak Singh, Bentley Product Advantage Group

    Background

    There is a requirement to generate an ec expression that validate the multiple nulls for a tag expression. In this wiki article, we will learn the possible customization that is required to achieve.

    Steps to Accomplish

    1. Load OpenPlant Project Administrator CONNECT Edition.
    2. Expand the workset and select desired associated application, in this case OpenPlant Modeler.
    3. From ribbon tab, select Settings > Expression Editor as shown below.



    4. This will load Expression Editor dialog. Search for desired class name and pick the property. In this case, Pipeline as class and NAME as property has been selected.
    5. For writing the EC Expression the criteria has been assumed where Tracing and Insulation thickness can be NULL. Please note that here Tracing is a string type property whereas Insulation Thickness is a double type property.

      EC Expression: this.UNIT & this.NUMBER & "-" & this.NOMINAL_DIAMETER & this.SPECIFICATION & IIF(this.INSULATION_THICKNESS>0,"-" & this.INSULATION_THICKNESS & this.INSULATION, "") & IIF(System.String.Length(this.TRACING)>0,"-" & this.TRACING, "")



      Notice that System.String.Length has been used where property data type is of string type. It is not required where property data type is of double type.

    6. Validate the expression and save the changes.
    7. Click on OK and close OpenPlant Project Administrator.
    8. Load OpenPlant Modeler, create a new pipeline name based on requirement and verify the result.

    See Also

    How to Preserve Original Number Value upon paste of Components in OpenPlant Modeler CONNECT Edition
    Applies To Product(s): OpenPlant Modeler CONNECT Edition Version(s): 10.10.00.72 Environment: Windows 10 (64-bit) Area: Modeling Subarea: Configuration Variables…
    Last edited 10 months ago in OpenPlant | AutoPLANT > OpenPlant | AutoPLANT Wiki

    • OpenPlant Modeler
    • System.String.Length
    • OpenPlant Modeler CONNECT edition
    • Expression Editor
    • >0 in EC Expression
    • Schema Editor
    • NULL in EC Expression
    • OpenPLANT Project Administrator
    • Share
    • History
    • More
    • Cancel
    • Deepak Singh Created by Deepak Singh
    • When: Wed, May 11 2022 6:48 AM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies