CONNECT Edition - Configuration Tips : User Preferences in OneDrive or Other Locations


For decades canny administrators have been locating MicroStation's user preferences on a server share for ease of management and, most importantly, to enable user profiles to roam with each user in situations where IT does not roam user profiles.

For a the same length of time Bentley has been recommending that user preferences are always stored locally, largely because the UPF file is written to very frequently during normal operation so network latency can affect application performance. Corrupt user preference files have been a noticeable support topic when located on network shares, generally on poor networks with high latency.

Until recently MicroStation CONNECT Edition did not allow complete relocation of user preferences, every file except the crucial UPF could be relocated. This changed in Update 13 when code changes enabled the value of the _USTN_USERCFG variable to be modified.

How to Move User Preferences to OneDrive

The most appropriate file in which to make this and related configuration changes is WorkSpaceSetup.cfg. In a Custom Configuration this would be the first CFG file to be read, e.g.: "F:\BB\BB_Configuration\WorkSpaceSetup.cfg"

The existing definition of _USTN_USERCFG needs to be removed using the '%undef' operator, then replaced with the new one and the path to the whole set of preference file must be set.

To locate the preferences in OneDrive folders Windows Environment Variables should be used. These automatically resolve to each active user name.

There are three:

  • OneDrive=C:\Users\<username>\<OneDrive for buiness name>
  • OneDriveCommercial=<username>\<OneDrive for buiness name>
  • OneDriveConsumer=<username>\OneDrive

Note, if you change the location of your consumer OneDrive folders via the OneDrive settings, the value of OneDriveConsumer will reflect that change.

Two variables need to be changed to relocate all user preferences, _USTN_USERCFG and _USTN_HOMEROOT. Changing _USTN_HOMEROOT will modify _USTN_HOMEPREFS.

The following statement in WorkSpaceSetup.cfg will effect the change; for aviod any confusion with personal OneDrive folders.the OneDriveCommercial variable is used:

    _USTN_USERCFG = $(_USTN_HOMEPREFS)/Personal.ucf
_USTN_HOMEROOT = $(OneDriveCommercial)/BentleyUserPrefs/MCE_User/

This example path allows for separate preferences folder (e.g. MCE_User, OBD_User, etc.) where multiple Bentley applications are in use.

The folders that will contain the preferences need to be created in advance using a simple batch file or login script, similar to those used in CONNECT Edition - Deploying or Updating ConfigurationSetup.cfg.

If you do not use OneDrive, a similar configuration could be used with other file sharing products, just put the appropriate path in the _USTN_HOMEROOT statement.

How to Move User Preferences to a Network Share

Storing user preferences on a network share was common practice for V8i. The same procedure described above can be used in this scenario but with a statement similar to this:

    _USTN_USERCFG = $(_USTN_HOMEPREFS)/Personal.ucf
_USTN_HOMEROOT = <MyNetworkSharePath>/BentleyUserPrefs/MCE_User/

This approach does not have the advantage of synchronising user preferences to the local drive so can be vulnerable to network latency.

Note: In both cases the value of the parent _USTN_HOMEROOT variable is modified, not  _USTN_USERCFG itself.