Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • Cancel
OpenCities Map
OpenCities Map Wiki - Customize Operations to show property based on criteria
    • Sign In
    • -OpenCities Map Wiki
      • -OpenCities Map
        • - End of Support for Bentley Map V8i (SELECTseries) products
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • +General Topics
        • -Geospatial Administrator
          • - About Expand Variables
          • - Automatically execute commands upon file open [XFM project]
          • - Automatically connect to a graphical source
          • - Base Source Directory and Files Node
          • - Base Source Directory configuration
          • - Built in XFM properties
          • - Capture point feature coordinates with two examples
          • - Change property order using text editor
          • - Changing project and workset information
          • - Concatenate properties to populate new property using Property Watcher
          • - Create a geospatial schema
          • - Create a new schema recommended workflow
          • - Customize Command Manager with help from Excel
          • - Customize dialogs
          • - Customize Operations to show property based on criteria
          • - Date Time Property Show None to set dates to null
          • - Decimal Precision in Analyze XFM Feature Results
          • - Defining polygons with holes or islands
          • - Domain list initial values
          • - Domain list width (Calculate List Width)
          • - Domain list width (Form View width)
          • - Feature Collection and Collection Name Property
          • - Files node in User Workspace
          • - Fix Cannot access a disposed object error
          • - Generate workspace from command line
          • - Increment property values
          • - Multiline text for PBA
          • - Number  properties and setting decimal places for data entry
          • - Open schema via desktop shortcut
          • - Property Watcher on an empty value
          • - Property Watcher to compute values
          • - Property Watcher to read Col2 of a Domain List
          • - Property Watcher to set true or false
          • - Property Watcher to update a date property
          • - Property Watchers to drive domain lists
          • - Replace text during Shapefile importing
          • - Replace text in cells using PBA with two examples
          • - Rounding numbers
          • - Set Area and Perimeter to Read Only
          • - Shortcut arguments –ws , -wr, -wu
          • - Shortcut Target path
          • - Sort properties by Display Name
          • - Store Last Value to define property fields for new feature placement
          • - Tabbed dialogs
          • - Text and Text Node Justification
          • - Text Annotation Subfeature
          • - Text features from PBA
          • - Text size settings
          • - Update property when Split/Merge used
          • - UpdatedBy and UpdatedDate properties
          • - Using raster images as a graphical source
          • - Value Col Name vs Edit Col Name
          • - Workspace location V8i compared to CONNECT Edition
        • +Feature Definitions and Inference Rules
        • +Interoperability
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
      • OpenCities Map Ultimate for Finland CONNECT Edition x64 (SES)
      • OpenCities Map Ultimate for Finland CONNECT Edition - Suomi
      • Bentley Descartes
      • +Other Geospatial Products

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

    - Customize Operations to show property based on criteria

    Operations work with methods to define the behavior of XFM features.  An operation is similar to a MicroStation command except that operations have a special finish notification that allows many operations to be sequenced together to perform feature placement.

    The following example illustrates how to use an operation property to show a feature property based on a criteria.  For example, in the video below:

    - The feature MyLine is selected for placement

    - The placement dialog shows both Status and Code

    - When Status is set to Existing, the Code property becomes available for data entry.  Existing lines are shown in magenta

    - When the Status is set to New, the Code property is not displayed, however the value 10010 is automatically set as a feature property.  New lines are shown in green.

    Play this video

    To accomplish this, a ComboBox property named Status is added to the Operation node of the MyLine feature:

    The ComboBox Properties are edited:

    - Store Last Value = Session - This property option defines how to store the last entered value.  When set to session, the last value is stored in the DGN only for this session of OpenCities Map.

    - Save Changes Key = placing - This defines the initial value key to use to save the current value when the item is changed.

    - Command Type = keyin >  activate method MyLine|Place - A key-in can be sent to MicroStation or a VBA event can be fired when a new selection is made.  This can be used to change the placement type.

    While dialogs are automaticall built for you when you insert the features placement metadata, it does not account for customized operations.  For this reason, the MyLine placement dialog will need to be updated manually. 

    Choose Dialogs > Place MyLine.

    In the Dialog Items pane, choose Insert > Operation Item .  This will insert a new dialogItem row above the selected row.

    In the Dialog Items pane, set the Property to the name of the property to add to the dialog.  In this example, it's Status. The Property specifies the name of property that will be set and that holds the dialog item specification.

    In the Item Detail pane, set the Operation to the name of the feature or feature collection. This is the operation name used to search the operations cache for the property. In this example, it's MyLine.

    The last item to change is to add a compare criteria on the Code dialog item which instructs it to only show up when the Status is set to Existing.  The syntax for Compare criteria is:

    COMPARE("[feature_instance_alias:property_name]", "compareValue", "")   - Compare a feature's property value as a string to the string value "compareValue"

    COMPARE("[feature_instance_alias:property_name]", "allow1|allow2|allow3", "|") - Compare a feature's property value as a string to see if it exists in the list of strings delimited by the "|" character

    COMPARE("[operation_name/property_name]", "compareValue", "")  - Compare an operation's property value as a string to the string value "compareValue"

    COMPARE("[operation_name/property_name]", "allow1|allow2|allow3", "|") - Compare an operation's property value as a string to see if it exists in the list of strings delimited by the "|" character

    In this example, the compare expression is:  COMPARE ("[MyLine/Status]","Existing","")  which compares the operation property Status value as a string value Existing.

    Notes:

    - Since the Status property is only being used to show/hide the Code property.  It is not written to the feature.  This is shown by reviewing the feature properties by with Anaylze Feature.

    - Likewise, you can't use the Status property with a criteria to set property based symbology.

    - The initial value for Code is set to 10010.

    - This article is based on the following discussion post:  https://communities.bentley.com/products/geospatial/desktop/f/bentley-map-forum/83169/problem-with-criteria

    A sample OpenCities Map CONNECT Edition XML is provided for your learning:

    5344.MyLine.zip

    • Geospatial Administrator
    • operations
    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Tue, Mar 12 2019 9:19 AM
    • Nelson Hobdell Last revision by Bentley Colleague Nelson Hobdell
    • When: Tue, Sep 27 2022 6:18 PM
    • Revisions: 13
    • 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