Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • More
  • Cancel
OpenCities Map
OpenCities Map Wiki - Replace text in cells using PBA with two examples
    • 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 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
          • - Define form fields for data entry that are not part of feature properties
          • - 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
        • +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. 

    - Replace text in cells using PBA with two examples

    This tutorial will explore replacing text in cells using Property Based Annotation (PBA).

    Click here to play this video

    Some applications require cell features to be placed with the text in the cell replaced by a property or some other value. For example, a cell indicating a hydrant cell might contain a text placeholder for an asset tag value, or a title block cell might have text placeholders for a title or drawing number.

    Example A – Title Block cell with simple text replacement

    In this example, a simple title bock cell contains three text replacements: Property_01, Property_02 and Property_03, where Property_02 is incremented by a value of 1 for each cell placement.

    The following describes how this cell is defined in the GSA.

    Property_01 is defined as a normal text box.

    Property_02 needs to increment by a value of 1 with each placement. To do that the Initial Value is set to increment the firstNumeric to a value of 1

    Property_03 is a normal text box.

    In the Symbology node, Replacement Text is defined for each text item in the cell that needs replacing. Since the value of the replacement text will be the property values, they are defined as follows:

    The Replacement Text Details are defined as follows. Note the Old Text is the text found in the cell.

    Example B – Property value sets cell selection

    (This example is extracted from the delivered example schema.)

    In the following example, the property values determine which cells to use as well as the values for the replacement text.   For example, cell PBA_01 is used when Alex is selected as prop4. Text is incremented by a value of 1, 2 or 3

     

    When Geddy is selected as prop 4, the cell is changed to PBA_02 and the text is incremented by a values of 1, 2 and 3 respectfully.

     

    When Neil is selected as prop 4, the PBA_01 cell is used and the text is replaced as defined in the GSA.

     

    The following describes the feature definition in the GSA.

    The cells each contain four text replacement text elements placed as [x]:

     

    Domain List

    In the Geospatial Administrator, the cell feature has four properties where prop4 has a domain list containing the following values: Alex, Geddy, Neil

     

     

     

     

    Increment Values

    Properties prop1, prop2 and prop3 are incremented by a value of 1, 2 and 3 respectively. This is defined in the Initial Values section for each property:

     

     

    Named Criteria

    Named Criteria for each value in the domain list for prop4 is created:

     

     

     

    Define which cell to use

    As noted above, cell PBA_01 is used when prop4 is set to Alex. If prop4 is not Alex, then use cell PBA_02. This is defined in the Cell Name key in the Symbology node.

     

     

    Replace text in cell with a property value

    In the Symbology dialog, a PBA Replacement Text key is added for each instance of text found in the cell. This is done by selecting the cell name key, performing a right click and selecting the PBA Replacement Text.

     

    For each replacement text that will be populated with a property value, enter the [property name] in the Value column.

     

    The Replacement Text Details for each are described as follows. The Old Text value is the text found in the cell. The Type specifies the action to take. For text that will be replaced with a property value, the Type is set to Expression.

    Replace text with other text and property value

    In the Symbology dialog, a PBA Replacement Text key is added for each instance of text found in the cell to be replaced. This is done by selecting the cell name key, performing a right click and selecting the PBA Replacement Text.

     

    The Replacement Text value is given a unique name. In this example it’s text3 to correspond to the [3] text in the cell.

     

     

     

     

     

    The Replacement Text Details are described as follows. The Old Text is the text found in the cell. The Type specifies the action to take. For text that will be replaced with alternate text, set the Type to PBA.

     

     

     

    In this example, the Replacement Text defined as text3 will be replaced with PBA text. To define the PBA key, a PBA Expression is inserted via the right click menu. Next the value for the PBA key is defined. Select each Replacement Text item, right click and choose to insert PBA Expression:

     

    The Name is set to the Replacement Text value, and the Type to PBA Expression.

     

    The value for the PBA key is defined as follows. Note that a criterion has been added to drive this text replacement.

     

     

     

    How it comes together:

     

    The attached zip file includes the project schema and cells used for this tutorial.

    ReplaceTextInCells.zip

    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Mon, Nov 6 2017 2:28 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Mon, Mar 9 2020 2:29 PM
    • Revisions: 3
    • 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

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