MicroStation startup is simply not just the main executable starting but rather a series of preplanned actions of each variable and its configuration data located in specific *.cfg, *.ucf/WorkSpace, *.pcf/WorkSet, and others.
All configuration files are simple text files that can be examined (and modified, in the case of user-modifiable configuration files) with any text editor.
Tim Hickman created a very nice flowchart of CONNECT Configuration. I have made minor edits and reused it below.
Let us now look at the various Configuration files involved in this process.
These are the “big three Configuration Files” of MicroStation CONNECT Edition. Configuration File processing starts with the mslocal.cfg. It is a "bootstrap" file with only a few lines - it includes msdir.cfg, another small Configuration File that is generated at install time and identifies the MicroStation installation directory, and then includes msconfig.cfg, which contains the main "program flow" of Configuration File processing.
The msconfig.cfg Configuration File begins by setting the _USTN_BENTLEYROOT Configuration Variables and a number of Framework Configuration Variables that point to directories where program data is installed. Those are necessary for program operation, but do not define locations for any user data or files. It then includes the system and application Configuration Files that are shipped with MicroStation. The msconfig.cfg file does not define any MS_XXXX (Operational) configuration variables.
Note: As a best practice, Never Edit these three Configuration Files. Bentley, in a way “owns” these files, and may use these for internal processing. They also are loaded at the lowest Configuration Level and the variables they set are at risk of being overridden by later level processing. Bentley provides ample opportunities and locations in which to include your own user specific configuration files.
While installing MicroStation, you can define custom path for the location of your Configuration. This path is set in the variable _USTN_CUSTOM_CONFIGURATION in this file. This file is located in the Configuration folder. Again, this file should also not be modified manually.
There are three possible uses of this file:
As a best practice, you should not change the delivered WorkSpaceSetup.cfg. Instead, you can create a copy of this delivered file to the Custom Configuration defined in the ConfigurationSetup.cfg file and then customize it.
There can be standards such as level libraries, cell libraries etc., that you want to be shared by all WorkSpaces and WorkSets. Such standards can be stored at a custom location defined by _USTN_ORGANIZATION. By default, _USTN_ORGANIZATION points to the Configuration\Organization directory, which contains one Configuration File, standards.cfg.
The user preferences and most recently used WorkSpaces and WorkSets are stored in the Personal.ucf file. The Personal.ucf file is stored in prefs folder of %LocalAppData%\Bentley\MicroStation\10.0.*.
Each WorkSpace has its own Configuration File. The location of this file is set in _USTN_WORKSPACESROOT defined in WorkSpaceSetup.cfg. You can customize the WorkSpace Configuration File. This configuration file can be used to redirect the WorkSpace root folder, WorkSpace Standards, or the WorkSet root folder. These can be changed using the _USTN_WORKSPACEROOT, _USTN_WORKSPACESTANDARDS, and _USTN_WORKSETSROOT configuration variables respectively. It also defines the location of the DGNWS file, which contains the Sheet Index for the WorkSet, via the variable _USTN_WORKSETDGNWSROOT.
The Folder Location settings in the Create WorkSpace dialog also set these variables.
Each WorkSpace can contain one or more WorkSets. Each WorkSet also has a Configuration File. After the WorkSpace Configuration File has been processed, the WorkSet Configuration File is loaded. The location of WorkSet Configuration file is defined in _USTN_WORKSETSROOT. This configuration file can be used to redirect the WorkSet root folder, WorkSet Standards, or the location of DGN files within the WorkSet. These can be changed using the _USTN_WORKSETROOT, _USTN_WORKSETSTANDARDS, and _USTN_WORKSETDGNS configuration variables respectively.
The Folder Location settings in the Create WorkSet dialog also set these variables.
This Configuration File is optional and can be used to define different configuration settings based on roles. The location of Role Configuration File can be defined in the _USTN_ROLECFG variable defined as a system environment variable or defined in one of the user-modifiable Configuration Files that are processed prior to reaching this part of msconfig.cfg.
In the next blog we will learn about DGNWS file and WorkSet Templates.
Translated German Wiki articles:Konfiguration Wiki/Blog Serie – Konfigurationsdateien in CONNECT