This is an updated version of an earlier V8i 101 article.

A DGNLIB is a DGN file used for the storage and distribution of shared resources. Its internal structure is identical, only the file extension is different. Files with the .dgnlib extension are treated differently within Bentley applications. For instance, Compress Design does not affect DGNLIBs.

DGNLIBs can be used to store a wide range of resources and can be applied at all levels of a configuration.

A number of DGNLIBs are set at the System level and are required by MicroStation and its related applications.

Custom DGNLIBs can be applied company wide or to specific projects by specifying them at Organization, WorkSpace and/or WorkSet levels.

What Can They Store?

Some of the resources that can be stored in DGNLIBs are:

  • Levels and Level Filters
  • Text Styles
  • Dimension Styles
  • Line Styles
  • Multi-line Styles
  • Cells
  • Color Books
  • Display Styles
  • Print Styles
  • Detailing Symbol Styles
  • Element Templates
  • Project Explorer Linksets
  • Standards Checker settings
  • Visualisation - Rendering Settings
  • Visualisation - Materials
  • Visualisation - Light Setups
  • Interface - GUI customization

Where are They Located?

Default DGNLIBs

We deliver DGNLIBs that are necessary for operation during installation in the local C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\ and its sub-folders. Currently included are:

C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\DrawComp\en\DrawingSeed.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\DrawComp\en\PageLayout.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Links\LinkSetSeed.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Printing\PrintStyles.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Render\LuxologyRender.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\System\en\SystemCells.dgnlib

C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\Archive\en\V8iTasks.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\GUI.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\ifcicons.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\NamedExpressions.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\Explorer\en\Explorer.dgnlib

C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\NCS.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\pantone.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\RAL.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\standardcolors.dgnlib

C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Materials\Bentley_LightWidgets.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Materials\Bentley_MaterialWidgets.dgnlib

C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Data\PersonalDgnlibSeed.dgnlib

These files should never be edited.

They do not need to be edited in any case as they can be overwritten or added to by site or project specific DGNLIBs when required.

Configurable DGNLIBs

The CONNECT Edition Configuration provides Dgnlib folders at all configuration levels, e.g. in the MetroStation example :

C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\Organization\Dgnlib\

C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\Example\Standards\DgnLib\

C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\Example\WorkSets\MetroStation\Standards\Dgnlib\

Organization and WorkSpace folders are empty ready for user content, the WorkSet folder will contain DGNLIBs appropriate to the example dataset and application.

Locations are globally specified by:


The default values for this variable are driven by a number of higher level variables that already include these locations so to make use of them the appropriate DGNLIB files just need to be dropped into the specified folders.

If additional locations are needed they can be appended path/file specifications to the MS_DGNLIBLIST and/or other  appropriate configuration variables at the appropriate level.

The Configuration Variables dialog can be used to explore active values for these variables.

Resource Specific DGNLIBs

A modular approach to DGNLIBs has always been the most manageable; and bear in mind that once your libraries are set up, they should only need occasional updating.

To aid DGNLIB management we have been adding resource specific variables to support this modular approach; Update 10 added five new variables, shown in bold:


If these variables are not defined then the paths/files specified by MS_DGNLIBLIST will be used to locate these resources.

Our example WorkSpaces/WorkSets include sub-folders for certain types of DGNLIB so they can be specified separately from the general list.

Where resource specific variables exist it can be useful to specify path and file name, usually with a wildcard, e.g.:


Setting this at WorkSpace level would allow any DGNLIB with that pattern (e.g.: MyProj_01_DimStyles.dgnlib) to be dropped into a WorkSet ...\Standards\Dgnlib\ folder to be recognized and used by the variable.

The colorbooks listes above are specified by the MS_COLORBOOK_LIBRARIES variable, to make yours show up at the top of the color book list use this statement:


(Note use of the pre-pend operator '<' explained below)


As suggested by the list above, GUI content is also stored in DGNLIBs.

An individual user's customizations are stored in Personal.dgnlib, the location is defined by MS_PERSONALDGNLIB, the default folder (for MicroStation, it will be different for other applications) is:


Shared GUI customizations must be stored in DGNLIBs in the locations specified by MS_GUIDGNLIBLIST, these include the GUI folders that we have delivered at Organization, WorkSpace and WorkSet levels of our example datasets.

What DGNLIBs do I need to add to my system?

The basics are generally, but any resource that you use that needs to be shared around a team should be put in a DGNLIB:

  • Levels and Filters
  • Text and Dimension styles
  • Line styles
  • Print Styles


DGNLIBs can be read from locations at the Organization, WorkSpace and WorkSet levels. If a library element, say a level, exists with the same name in more than one library, MicroStation will use the first instance of that level it finds. The order in which libraries are read can be important. Here the use of operators with the MS_DGNLIBLIST variable can be important.

Generally we define the locations for DGLIBS at Organization, WorkSpace and WorkSet levels by appending (using the '>' operator) those location to the variables, these are pre-defined in msconfig.cfg.

However, if you need the DGNLIBS at these levels to take precedence or overwrite the defaults (but be careful with overwriting, some of the system DGNLIBs are important!), statements will be needed at the appropriate level to pre-pend the Organization, WorkSpace or WorkSet libraries; e.g.:

MS_DGNLIBLIST              < $(_USTN_WORKSETSTANDARDS)Dgnlib\*.dgnlib  

In most cases do not set these variables using = as the operator, that will exclude DGNLIBs from other locations leading to all sorts of possible errors.


  • Use Windows Folder permissions to keep shared DGNLIBs read-only to users. If you don’t do this your CAD Standards will not be standards for very long! I also suggest using a specific CAD admin user to manage DGNLIBs (and the whole Bentley Configuration), especially where the CAD admins also carry out design work, it’s easy to make inadvertent changes to standards in that situation.
  • Keep Text and Dimension styles can either be kept in the same DGNLIB, or if specified by the MS_DGNLIBLIST_TEXTSTYLES and MS_DGNLIBLIST_DIMENSIONSTYLES variables can be in separate files. (Dimension styles use your text styles so attempting to keep a separate text styles DGNLIB without setting the variables will result in the text styles being copied into the dimensions DGNLIB.)
  • Use structured file naming for your DGNLIBs, e.g:
    • Org_LevelsFilters.dgnlib
    • Org_Text.dgnlib
    • Org_Dims.dgnlib
    • Org_LineStyles.dgnlib
    • Org_PrintStyles.dgnlib
  • DGNLIB Import/Export.
    Levels can be exported to CSV. It is often easier to create, organise and modify your levels in excel, using the series copy and concatenation functions for example.
    Color Books are easier to create in CSV, see MicroStation - Creating a Custom Colour Book. The CSV is then a useful backup/record.
    User interfaces customisations and Element Templates can be exported to XML.
    Some of the styles dialogs have import options, these are covered by the help documents.

Updating Library Content

The following commands can be used to update the listed types of content: