You are currently reviewing an older revision of this page.
This freeware application 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.
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.
The sample XML provides the following examples that demonstrate different formatting options for the changed date.
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.
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.
Bentley Map will only invoke the key named modified. Rename the samples value accordingly.
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.
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.