Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • Cancel
OpenCities Map
OpenCities Map Wiki - Auto update Editing initial values (Sync1 MDL)
    • 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
        • +Feature Definitions and Inference Rules
        • +Interoperability
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • -Freeware - Utilities - Applications - Programs
          • - Auto update Editing initial values (Sync1 MDL)
          • - Centroid text to shape (VBA)
          • - Change feature elevation (VBA)
          • - Convert text to XFM and propagate text string to shapes using VBA
          • - Create schema from Shapefiles (Schema Register EXE)
          • - Export text string and Element ID (TextNodeToTextFile VBA)
          • - Extended Properties (xProps MDL)
          • - Label latitude and longitudes (VBA)
          • - Learning Resources
          • - Load properties from text strings (text2xfm VBA)
          • - Planarize 3D Polygon (MDL)
          • - Show XFM Properties on tool tips (MDL)
          • - Symbology Integrator (EXE)
          • - Utilities from Elivagner Barros
          • - XFM attribute query (Feature Query VBA)
          • Setting Level for reference attachment (VBA)
        • +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. 

    - Auto update Editing initial values (Sync1 MDL)

    This MDL is for V8i only.

    ------

    The UpdatedBy and UpdatedDate properties to are used to capture the current Windows user and current date when a feature is placed. This is described in the following article.

    https://communities.bentley.com/products/geospatial/desktop/w/geospatial_desktop__wiki/36875/--updatedby-and-updateddate-properties

     

    To capture the current user and date when editing or modifying features, a different approach is required since the Editing initial value key is only applied when performing the Bentley Map EDIT FEATURE command. This means that MicroStation commands such as MODIFY ELEMENT or MOVE ELEMENT do not trigger the Editing initial value key to be applied.

    The attached application was originally developed as an example using the Bentley Map API and some custom development. When loaded in a Bentley Map session, it will apply Editing initial values when XFM feature instances are manipulated using MicroStation commands or the Bentley Map EDIT FEATURE command. This ensures that you’ll always know when an XFM feature has been modified graphically regardless of the editing method used.   The Sync1 application is not involved in the actual expression evaluation. Bentley Map and underlying expression evaluators are responsible for parsing and evaluating the provided expression.

    Play this video

    The sample XML provides the following examples that demonstrate different formatting options for the changed date.

    • modified_1 = MyMonument.ModifiedTime 

    • modified_2  = System.String.SubString (MyMonument.ModifiedTime,0,(System.String.Length(MyMonument.ModifiedTime)-System.String.IndexOf(MyMonument.ModifiedTime, " ")+1))

    • modified_3   = System.String.Format("{0:yyyy-MM-dd}", System.DateTime.Now())

     

    Note, the formatting of the ModifiedTime value is hard-coded to use a platform function and is set to YYYY/MM/DD HH:MM:SS.  The formatting of the Created Data property is using the System.DateTime which is defined by your computer settings.  This may result in a mismatch in the display of the date-time values with respect to their formatting.

    Bentley Map will only invoke the key named modified.  Copy and paste the value from modify_1, modify_2 or modify_3 into the value field for modify.

    The attached zip file contains the needed DLL, MA and accompanying Bentley Map schema for your learning.

    To install the sync1 application,  extract sync1.dll and sync1.ma files from the archive and copy those files to the ...\Map\mdlapps folder.

    To load the sync1 application in a Bentley Map session, enter the following keyin: mdl load sync1

    Alternatively, you can add MS_GEOINITCMD = mdl load sync1 to the Workspace Macro node in your Bentley Map project. This will cause sync1 to load during the startup of Bentley Map.

    7167.sync1.zip

    Disclaimer - This application is supplied as-is and does not come with support. Bentley Systems Inc., and the author of this programs assume no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this application at your own risk.

    • Initial Values
    • edting
    • Freeware
    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Thu, Jul 19 2018 2:18 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Thu, Nov 22 2018 4:27 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