DGNLIB Dilemma: Using One or Multiple MicroStation DGN Libraries to
Achieve CADD Standards Compliance
By John Higgenbotham &
Dennis Rodriguez, Parsons Brinckerhoff
May 20, 2011
DGN Libraries (files with a .DGNLib extension) were introduced with
the first release of MicroStation V8 and initially were used to store
level definitions. In MicroStation V8 2004, the ability to store Text
Styles, Dimension Styles, and Multi-Line Styles was added to the file
format. In MicroStation XM and V8i, DGN Libraries can contain even more
features such as CUSTOM Tools and Task interfaces. By using DGN
Libraries on our projects, we make it easier for the CADD manager or
administrator to change the CADD Standards as a project evolves without
disrupting the CADD user’s workflow or causing a CADD user to go back
and redo work. By customizing the DGN Library beyond the typical level
definitions, text styles and dimension styles, we can add even more
power to the DGN Library by defining custom menus, tools and even
customized task menus to speed performance of a specific task. Use of
DGN Libraries is essential to make it possible for MicroStation users to
more easily comply with CADD Standards.
Why do we need MicroStation users to comply with CADD Standards?
- Producing consistent drawings provides a higher quality product.
- Clients or Companies often have CADD standards that must be
- CADD standards make it easier for CADD users to do their job,
thereby saving time and budget.
- CADD standards promote teamwork on projects by having one shared
standard to follow.
We have CADD Standards, why do we need to use a DGN Library?
CADD standards are often defined
by what a client wants their deliverable to look like. They can also be
standards issued by your company or your CADD department’s preferences
or just common drafting practices used by your local office. Usually it
is a combination of several of these. Any of these items can be easily
defined using a DGN Library file, which is easily modified during the
course of a project when the need arises, ensuring all users have the
latest CADD standards. A DGNLIB can also be configured so it can’t be
edited by your CADD users, which helps to enforce adherence to CADD
standards. The question is do you need to use a single DGNLIB or
multiple DGNLIB files to achieve compliance to your CADD standards?
Back in the days of MicroStation
J, we used 63 total levels and many of our clients separated out their
levels by discipline, using levels 1-63 for each discipline. Many of us
got used to this system and when DGN libraries first became available we
simply made a DGNLIB file for each discipline and named our
levels; Level 1, Level 2, etc. all the
way up to Level 63. For those of us also using AutoCAD’s unlimited
named levels, we started to create level names based on the usage of the
level or based on a universally accepted CADD standard such as the
United States National CAD Standard (NCS), depending on what we needed
to use on a project. When using hundreds or even thousands of levels in
a single DGNLIB, we created Level Filters to filter levels so it was not
necessary to scroll through a long list of levels to find the one that
was needed. We simply selected the filter for the discipline we needed
and selected the level we wanted.
Which is more practical, using multiple DGN Libraries or a single
Although that question is at the core of this discussion, it is not
an easy answer. You should make it easy to update and administer new
CADD standards because they will change over the course of any project.
You will always need to add new levels or change level symbology
settings or add new text or dimension styles. The DGN Library is a
living file over the course of a project, or maybe several projects. You
will probably not set it up once and then forget it. If you always work
with just one client and they issue you a DGNLIB file with everything
defined and you never have to change anything, consider yourself very
lucky! Most of us have to define a DGNLIB for our client’s standards and
then add missing levels that the client standard does not consider, so
for large projects we are occasionally managing the DGNLIB and the CADD
users are receiving those updates seamlessly through our MicroStation
One approach that seems to be very popular is taking a modular
approach to using DGNLIB files on a project. The client levels are
placed in one DGNLIB, along with client text and dimension styles. These
typically have many levels, so level filters are added so that we can
view levels by discipline. Another DGNLIB file can be used for special
(non-client) levels and styles that will also be needed to complete the
work. Another DGNLIB file will contain some custom menus used by our
company and will load every time we use MicroStation, regardless of the
client. Another DGNLIB will contain custom tools used only in our local
office or region to help speed up production of specific tasks. Some or
all of these will be configured to load depending on the project we are
For many projects, a single DGNLIB file containing level names and
symbology, text styles, and dimension styles has been adequate. The key
issue is that the functionality of a DGNLIB has become much more
powerful with each new version of MicroStation and DGNLIB files can be
customized and configured in any number of ways to harness this power.
If you are involved in setting up workspace configuration, establishing
or enforcing CADD standards, development of custom tools and menus or
any type of CADD administration, you should be using DGN Libraries to
help the CADD production process flow more smoothly.
What can be contained in a DGN Library (DGNLIB)?
- Levels - level definitions (names, ByLevel symbology and
symbology overrides), level filters
- Text Styles - named styles to control text usage at common scale
- Dimension Styles - named styles to control dimension format at
common scale factors
- Detailing Symbol Styles
- Display Styles
- Custom Line Styles and Multi-Line Styles*
- Cell Libraries/Models
- Color Books, Light Setups, Material Definitions and Rendering
*Custom Line Styles contained in a DGNLIB can’t be edited, but that
functionality may be added soon!
There are many tutorials available online to help you create custom
DGNLIB files and give you examples of what can be added. Many of these
articles also provide configuration tips.
What else do I need to know to use DGNLIB files?
Here are a few key points to help you get started and to help you
avoid any issues that might arise when using DGN libraries.
DGNLIB files are the same as a DGN file but use .dgnlib for the file
extension. These files should be protected in your configuration so they
can’t be opened and edited by anyone other than those responsible for
defining and enforcing CADD standards.
DGNLIB files are not the same as MicroStation seed files and should
not be used the same way. A typical seed file should be an empty file
containing no elements and no levels, set to the proper settings for the
region it is to be used in. The seed file, not the DGNLIB file, should
be used to create new design files or sheet files. The CADD workspace in
use will load the DGNLIB settings, which load the levels, text and
dimension styles, and other element templates, tasks or custom menus
needed to create design files.
The best way to create or edit DGNLIB level settings is within a .csv
file (Microsoft Excel or other spreadsheet editor). The .csv file can be
imported into an empty DGNLIB file to create (or update) the level
definitions, including any symbology overrides or level attributes such
as "locked", "freeze" or "plot". A .csv template file can be created
from a good DGN file by using Level Manager’s export feature.
Beginning with MicroStation XM, a safety feature was added to prevent
compressing out unused levels, styles and other features from a DGNLIB
A cell library is a type of DGNLIB, containing models (cells), only
it has a .cel file extension.
Multiple DGNLIB files using the same level number can be used. In
this case MicroStation will use the level name and symbology definitions
from the last file listed in the MicroStation DGNLIB configuration. Best
practice is to not duplicate level number ranges in separate DGNLIB
files, in order to avoid confusion. Also, avoid using levels 1-63 at
minimum (1-999 is a better idea!). This will reveal any files using
non-standard user-created levels or levels from older MicroStation
format files, making standards compliance easily viewable within each
Use blocks of level numbers to represent a discipline or other set of
features. For new CADD standards, consider following National CAD
Standard (NCS) or other widely-used level standards.
Consider "locking" users from creating new levels to enforce
adherence to use of your DGNLIB level settings. Total conformance to a
DGNLIB file’s ByLevel symbology is a nice goal, but it is seldom
achieved. If users can follow most of the settings from a DGNLIB file
and not create new levels of their own, then you are off to a very good
start toward achieving that goal!
Using DGNLIB files makes it possible to use MicroStation Standards
Checker (added in V8 2004) to check design files for CADD standards
Always keep a backup of your DGNLIB files in case they become
Never attempt to modify a DGNLIB while it is in use and connected to
a workspace (See next section).
What is the best way to create a DGNLIB?
When creating or editing a DGNLIB you must first make sure that you
are not picking up any other DGNLIB levels or settings in your current
working DGNLIB file. A simple way to make sure you are not causing a
problem with "circular libraries" is to make sure your current
MicroStation workspace is not pointing to a DGN Library. One tip that I
read was to create a "NoDGNLIB.ucf" user configuration based on the
default MicroStation "untitled.ucf" user configuration. I make a copy of
the "untitled.ucf" file and rename it to "NoDGNLIB.ucf". I include the
and then save the file. The configuration variable should now display
no DGNLIB file paths.
To open a new or existing DGNLIB file, I set my User to NoDGNLIB and
my Project to No Project:
Let’s say I want to edit an existing DGNLIB that seems to be
loading slowly due to several imports of levels, filters and new text
and dimension styles. I am going to open a new seed file that contains
no elements, levels or text and dimension styles and then save it as a
new file called "New_DGNLIB.dgnlib". My existing DGNLIB also has ByLevel
symbology overrides set so anytime someone creates an element in their
design file they automatically get overrides for the new level. If
"Level Overrides" is set on in View Attributes, then the symbology will
display with the override values. I want to prevent this from happening
by stripping out the override values from the DGNLIB file.
In Level Manager, go to Levels -> Export, then save as a .csv file.
Here is what the exported .csv will look like:
Now I will edit the .csv file by changing some values and renaming
some of the levels. Then I will clear all the values from the Override
columns so the overrides won’t display in my new DGNLIB. When I’m
finished I will save the file and import it into my newly created clean
file, New_DGNLIB.dgnlib. After importing the levels into my file I check
the ByLevel display in Level Manager and then check the Overrides.
Now I can import my Level Filters, Text Styles and Dimension Styles
from another DGNLIB and my new DGNLIB will be ready! You can always
separate your Text Styles and Dimension Styles out into their own DGNLIB
files. You will just have to take some care in how you tell MicroStation
to load your DGNLIB files into your current session.
What if I modify my DGNLIB? How do I update my files with the
To update a design file after a DGNLIB has been modified, you can use
several key-ins to update specific settings or all settings.
- dgnlib update all
- dgnlib update levels
- dgnlib update textstyles
- dgnlib update dimstyles
- dgnlib update mlinestyles
What about configuration?
For configuring MicroStation to load your various DGNLIB files there
are a couple of variables that will need to be modified depending on
what you want to load.
MS_DGNLIBLIST - loads content such as levels,
level filters, text and dimension styles and other items.
MS_GUIDGNLIBLIST - loads interface content such as element templates,
menus, or custom tools.
Unlike the example above for loading no DGNLIB
files, it is recommended that you never use "=" for either variable as
this will override some of the intended functionality within standard
MicroStation and may cause your configuration to not work as intended.
It is also recommended that you use the default configuration paths
within the standard configuration of MicroStation to make it easier to
manage your DGNLIB files and upgrade them to newer versions of
Here is an illustration of one potential
configuration. You may want to list your DGNLIB files separately as
shown below, rather than using *.dgnlib.
This will cause any changes to the levels to be synchronized back to
the project DGNLIB rather than the company DGNLIB. You could also load
separate DGNLIB files like this.
Any custom tools or menus might be loaded like this.
Obviously, there are several ways to configure your DGNLIB files, so
please consult the available documentation before changing any
configuration variables that might affect other MicroStation users.
As you can see, using DGNLIB files to load various components into
your MicroStation session can help keep your MicroStation users
organized and working together toward a common goal. How you choose to
accomplish this is up to you, but using DGN libraries can save you some
headaches and hopefully save budget on your projects!
About the Authors
John Higgenbotham is a CADD Designer for Parsons Brinckerhoff
in San Diego, CA. He has been using MicroStation and AutoCAD on
transportation projects for the past 18 years, working as a CADD Manager
on several large design-build projects.
Dennis Rodriguez is employed by Parsons Brinckerhoff in San
Bernardino, CA. He has been with the company for over 9 years and has
been using MicroStation and AutoCAD for 19 years. He started as a CADD
Technician but quickly advanced to a CADD Manager position and is also
involved as a West Geography CADD Managers Facilitator within the