[V8i Ss3 and earlier] Assignment Error in msconfig.cfg

Working with our consultants, we have seen a number of issues where our workspace is not correctly configured and a launch of MicroStation dies at a particular line in the process. We have always concentrated on getting the assignments that we supply corrected, which fixes the problem. But today, an internal user was experiencing the same problem. In this case, a number of file in ProjectWise were configured to load a particular workspace profile. This, is not a ProjectWise issue however. At its core, it is an obsolete default assignment in msconfig.cfg. This particular profile tried to use a startup.cfg file. However, the location the file used to reside at does not exist anymore. So, when a startup.cfg is specified in error, MicroStation loads msconfig and processes whatever the default settings are. This is where the problem occurs.

Lines 68 and 69, define _USTN_BENTLEYROOT and _USTN_WORKSPACEROOT. However, _USTN_WORKSPACEROOT is defined as a Workspace subfolder under _USTN_BENTLEYROOT. At some point, the default workspace was moved from the Program Files (x86) folder structure to the ALLUSERSPROFILE location.

By not setting this path correctly, MicroStation cannot start if it is mising its startup.cfg file, be that mslocal.cfg or a special startup.cfg called by a command line switch.

This error can be traced back to the fact that when msconfig.cfg is loaded without msdir.cfg, the variable _USTN_WORKSPACEROOT does not get assigned so the assignemt in msconfig.cfg get used.

A simple fix would be to add a test for its definition and then to attempt assign it using the path in ALLUSERSPROFILE to build a likely location. Even this could be tested before any assignment is made. And if it is unable to locate a local workspace, it should be able to generate an error message.