Recently on


© 2023

Printed from © TMC Publications (UK) Ltd 2010

MicroStation 101 - The Not Quite One Page Guide to Workspace Configurations
by Karen Fugle - 10 March 2004

What are cfg’s?
Nothing to do with chlorofluorocarbons and a lot more user friendly, .cfg’s are the configuration files which let CAD managers customize MicroStation to specific disciplines, projects or tasks (we like control!). If managed from a centralised location they will allow easier management and quicker problem solving.

Ok, what are they?
We will take a look at the four Main configurations, the .ucf, the .upf, the .pcf, and the biggie configuration file – Standards.cfg.

*.UCF = User Configuration File

What does it do?
The user configuration file has two basic functions. First, it specifies the active workspace components, a combination of the user preference file (.upf) and the last project and user interface you were using. Secondly, it contains values for any configuration variables set by you, the user, to control MicroStation's behaviour.

Hang on a minute, what’s a configuration variable?
MicroStation uses configuration variable files (text files) to get values for settings that vary from system to system and from user to user. Each configuration variable has two parts — its name and its definition. For instance, configuration variables can be a path, to tell MicroStation where to find files, or they can point to a directory or where to save files, or they can specify a filename, or they can be a keyword to specify certain default settings.

Where do I find my UCF?

The User name in MicroStation Manager identifies the name of the .ucf it uses.

Your company may use a single user name such as architects.ucf which is stored on each users C drive location and this will be the standard .ucf for all users in the company.

Alternatively, if the user name is set to the individuals log in name (jbloggs) then each individual user can have their own .ucf e.g. jbloggs.ucf that can sit in a centralised location under Workspace\users on your server. You can do this by using the variable; _USTN_USERNAME= $(USERNAME).

What’s in it?
It is made up of Configuration Variables;

Can I have an example?
Here is an individually named Karen.ucf file;

# User Configuration File Revision 1.0
# Date 12 Jan 2004
These two configs are the last used Interface and project number automatically remembered.
Then I have added capabilities required of a Cad Manager that the rest of my users will not have;
I have locked my users from creating levels and editing in the Level Manager dialog, so I have added these capabilities back into my .ucf


MS_LEVEL_EDIT_ATTRIBUTE_LIST = ByLevelSymbology,OverrideSymbology,GlobalDisplay,GlobalFreeze,Lock,Plot

*.UPF = User Preference File

What does it do?
It saves an individual’s customised preferences. When you choose Workspace>Preferences within MicroStation, the settings in the Preferences Dialog box are personal to the user, rather than maintained across an entire workgroup.

Where do I find it?

NOTE: I keep my .upf together with the .ucf in the Workspace\Users directory and in my Standards.cfg use MS_USERPREF = $(_USTN_HOMEPREFS)$(_USTN_USERNAME)-$(_ENGINENAME).upf

This means that if I log in as Karen I am creating a karen-microstation.upf in my Users directory. This also allows access to my preferences from any pc.

What does it affect?
So far my short list of what the upf stores is as follows

Tool palettes
Which tools are visible.
Workspace>Preferences settings (except the Compatibility tab in MicroStation J)
Window areas (zoom previous/forward)
Key-in's and Accudraw
Last file you were in (If ms_filehistory is on the last four design files)
Last printer driver used (overriding MS_PLTR)
Last seed, cell library (overriding MS_DESIGNSEED)
Last Settings manager .stg file used
Directory where you saved the plot or file (overriding MS_PLOTFILES)
Digitizing setup.
Button Assignments.

I’ve been having problems with corrupt .upf files!
Know what you mean, so what do the bigwigs say on the matter?

Barry Bentley replies to a Discussion Group thread:

"The user preference file has many things in it - obviously the user preferences you set in the Preference dialog, but also window positions, file histories from all the file open dialogs, line style selection history, many MDL application user preferences, etc. It allows finding those little bits and pieces directly and updating them very quickly and efficiently. MicroStation opens, reads and/or writes, and then closes the user preference file many times during a session.
A text file is inherently accessed serially, and every time anything is changed you have to rewrite the whole thing. At least for now, the resource file format we use for the UPF file is a better choice. As I have mentioned several times in various threads, we have put a lot of work into making the UPF file reads and writes more robust, and I believe you will see a big improvement in reliability in V8.5."

Light at the end of the tunnel perhaps? And for any of you lucky enough to have a play around with V8.5 here’s a good tip for you to try courtesy of Mark Coates at Bentley:

"One of the things we have done in the V8.5 Release Candidate that will be available soon is adding a configuration variable that does some diagnostics. When you get the V8.5 RCII, please set the configuration variable MS_MONITOR_USER_PREFS to 1. That causes several tests to be active, including watching for MDL applications that improperly use the user preference file. You should see extra items appearing in the message centre only when information is incorrectly being stored in the upf or the upf file is not being closed correctly after information is written to the upf file."

*.PCF = Project Configuration File

What does it do?
.pcf’s are made up of configuration variables that specify the data files that are particular to that project.

Where do I find it?

Can I have an example?
Here is an example of the .pcf for project 9999.

# Default PCF Template Setup.cfg
# Revision 1.0
# Date 12 Jan 2004

# Project Number: 9999
# Description: J Bloggs Garage
# Date created: 12 Jan 04


I created an MPM (MicroStation Project Management) variable to make it easier to specify the location of my project directories.
In the Standards.cfg I use MS_RFDIR > $(MPM)plans/ to specify each of my default project directories (such as Plans). All additional folders to the project are specified below.
To make life easier I leave additional information hatched out in the .pcf just in case the project needs it.

#MS_BATCHPLT_SPECS = $(MPM)Seed/Batchplt.spc Specific project batchploting setups
#MS_DWGDATA = $(MPM)Seed/dwgdata/ Specific project .dwg conversion setups
#MS_RFDIR > $(MPM)additional/ Additional project folders for reference files
#MS_RFDIR > $(MPM)additional/

Sounds fairly easy…
BUT beware! MicroStation may have a problem with between / and \. As a rule use the / and you should be ok.

Another tip worth noting is to place a carriage return at the end of all config .pcf and .ucf files. Make sure you have a carriage return after the last line or it does not read in the config file at all. Sometimes .pcf files have a hard time coping with #’s! If your .pcf doesn’t work then delete the hashed lines out.

Standards.cfg = The big Mama in configuration files!

What does it do?
Defines all your company configurations that make MicroStation as powerful as you wish it to be.

Where do I find it?

Make sure you go through each configuration you use and understand what it means. Try and put the definition in the file as well, so you don’t have to remember what they mean! Order your Standards.cfg logically so it easier to find your configuration, mine is set out under the following headings and then placed in a “sort of” alphabetical order (I’m not a nerd, just a geek!)

System (_USTN) Variables
MicroStation (MS) Variables
MicroStation Directories
MicroStation Files
Additional Settings
Project configuration variables

# Standards.cfg for V8
# Revision 1.0
# Date 13 January 2004
# System (_USTN) Variables
# MicroStation (MS) Variables
MS_DESIGN_HISTORY = create=0;delete=0;commit=0;browse=0
# when set to 1, if an overall saturation or colour of a reference is adjusted it also affects any live nested references
# Sets RasterManager to load images into memory rather than a local temp folder from where it does not delete them!
# Disables V8 functionality to resolve references that do not have a material table from the parent (ie where it is referenced into)
MS_LEVEL_EDIT_ATTRIBUTE_LIST = OverrideSymbology,GlobalDisplay,GlobalFreeze,Lock,Plot
# what users can edit in Level Manager. Remember I put the opposite back into my .ucf so that, as CAD Manager I have more rights that the users.
# what updates when you sync levels from the dgnlib.
# when reloading a ref the symbology overrides stay altered. We want the Bylevel symbology to change back to company standard.
# hide the menu item that allows the editing of drivers in the plot dialog box.
# Open to discussion this one. Apparently, when set to 0 it will only delete unused levels with "Required" set to 0 in a CSV file. If set to 1 it will delete all unused levels. Results may be varied!

# MicroStation Directories
MS_BUMP < $(_USTN_SITE)materials/bump/
MS_CELL = $(_USTN_SITE)cell/ # Cell libraries
MS_CELLLIST > $(_USTN_SITE)cell/*.cel
MS_CELLLIST < $(MPM)SEED/Projectv8.cel
MS_CELLLIST = $(_USTN_SITE)cell/*.cel
MS_CELLLIST > $(_USTN_SITE)cell/Ceiling/*.cel
MS_CELLLIST > $(_USTN_SITE)cell/furniture/*.cel
MS_CELLLIST > $(_USTN_SITE)cell/patterns/*.cel
MS_CELLLIST > $(_USTN_SITE)cell/people/*.cel
MS_CELLSELECTORDIR : $(_USTN_SITE)cell/ # Cell Selector files
MS_CELLOUT = $(_USTN_SITE)cell/ # Cell lib output dir
MS_DATA < $(_USTN_SITE)data/
MS_MACRO < $(_USTN_SITE)macros/ # BASIC macros
MS_MATERIAL = $(_USTN_SITE)materials/
MS_PATTERN > $(_USTN_SITE)materials/pattern/
MS_PENTABLE = $(_USTN_SITE)tables/pen/
MS_SETTINGSDIR > $(_USTN_SITE)data/ # Settings Manager data
# MDL application are platform-dependent. Setting MS_MDLAPPS this way
# allows the same workspace tree to be shared by multiple platforms.

# MicroStation Files
MS_BATCHPLT_SPECS = $(_USTN_SITE)data/ batchplt.spc
MS_CELL_SEEDFILE = $(_USTN_SITE)seed/seedv8.cel
MS_DESIGNSEED = seed.dgn
MS_DGNLIBLIST = $(_USTN_SITE)dgnlib/levels.dgnlib
MS_DGNLIBLIST > $(_USTN_SITE)dgnlib/Text & Dim.dgnlib
MS_DWGDATA = $(_USTN_SITE)tables/Dwg/dwgdata/
MS_DWGSEED = $(_USTN_SITE)seed/seed.dwg
%if exists ($(_USTN_HOMEPREFS)funckey.mnu)
MS_PLOTDLG_DEF_PLTFILE = $(_USTN_SITE)plotdrv/Printer.plt
MS_SYMBRSRC > $(_USTN_SITE)symb/*.rsc
#MS_SETTINGS = $(_USTN_SITE)data/styles.stg
# I have hatched this setting out as MicroStation will not use Settings>Manage in the future.
MS_SHEETSEED = $(_USTN_SITE)seed/sheets.dgn
MS_TRANSEED = $(_USTN_SITE)seed/seed.dgn
MS_V7TOV8_CSVNAME = $(_USTN_SITE)dgnlib/upgrade_remap.csv
# This is a remap file that I will use when upgrading projects from V7 to V8.

# Additional Settings
MS_DGNAPPS $(_USTN_SITE)mdlapps/intelnt/

# project configuration variables
MS_CELL < $(MPM)seed/
MS_CELLLIST < $(MPM)seed/*.cel
MS_PLTFILES = $(MPM)export/
MS_RFDIR > $(MPM)3d/
MS_RFDIR > $(MPM)plans/
MS_RFDIR > $(MPM)plot/
MS_SYMBRSRC < $(MPM)seed/*.rsc
MS_DGNOUT = $(MPM)export/
MS_IMAGEOUT = $(MPM)export/
MS_IMAGE = $(MPM)import/
MS_IMGOUT = $(MPM)export/
MS_TAGOUTPUT = $(MPM)export/
PZIP_OUT = $(MPM)export/

Phew, that contains just about everything!

But, what do the symbols mean?
= means set the variable to be this value.
> means add another value at the end of my list (or if not yet defined, does the same as =).
< means add another value at the start of my list (or if not yet defined, does the same as =).
: means set the variable only if it hasn’t already been set.
# means ignore anything after the # on this line.

So how does MicroStation put all these configuration variables together?
Ok, when MicroStation starts up it process from the lowest priority to the highest:

1. All the System variables …config/system

(there can be multiple config variables to process)

2. All the Application variables …config/appl

(there can be multiple config variables to process)

3. All the Site level variables …Workspace/Standards/ e.g standards.cfg

(there can be multiple config variables to process)

4. All the Project level variables …Workspace/Projects e.g. .pcf

(can process only one .pcf)

5. All the User level variables …Workspace/Users e.g. .ucf

(can process only one .ucf) The user level configuration variables take precedence over all the other level settings.

Crikey Dick, can I go now?
If you need to know more about what configuration variables you can use, go to the MicroStation Help files – search for “Working with configuration variables”.

Last word! It’s a worthwhile exercise to go through all your config files with a fine tooth comb! Once you have them clean and tidy it’s a lot easier to get to the root of problems, add in new configs and clean out superseded ones. Good Luck!