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.
Some of the resources that can be stored in DGNLIBs are:
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.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\DrawComp\en\PageLayout.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Links\LinkSetSeed.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Printing\PrintStyles.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Dgnlib\Render\LuxologyRender.dgnlibC:\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.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\GUI.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\ifcicons.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\en\NamedExpressions.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\GUI\Explorer\en\Explorer.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\NCS.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\pantone.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\RAL.dgnlibC:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Colorbooks\standardcolors.dgnlib
C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Default\Materials\Bentley_LightWidgets.dgnlibC:\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.
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:
MS_DGNLIBLIST
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.
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; the complete list of these variables as of Update 15 is:
MS_DGNLIBLIST_CLASHMS_DGNLIBLIST_DETAILINGSYMBOLSTYLESMS_DGNLIBLIST_DIMENSIONSTYLESMS_DGNLIBLIST_DISPLAYSTYLESMS_DGNLIBLIST_DRAWINGSEEDSMS_DGNLIBLIST_ELEMENTTEMPLATESMS_DGNLIBLIST_ITEMTYPESMS_DGNLIBLIST_LEVELSMS_DGNLIBLIST_LINESTYLESMS_DGNLIBLIST_LINKSMS_DGNLIBLIST_PRINTINGMS_DGNLIBLIST_RENDERMS_DGNLIBLIST_TEXTFAVORITESMS_DGNLIBLIST_TEXTSTYLES
and:
MS_GUIDGNLIBLIST (see below)
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.:
MS_DGNLIBLIST_DIMENSIONSTYLES < $(_USTN_WORKSETSTANDARDS)Dgnlib\*_DimStyles.dgnlib
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:
MS_COLORBOOK_LIBRARIES < $(_USTN_ORGANIZATION)ColorBooks/*.dgnlib
(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:
C:\Users\<username>\AppData\Local\Bentley\MicroStation\10.0.0\prefs\Personal.dgnlib
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.
The basics are generally, but any resource that you use that needs to be shared around a team should be put in a DGNLIB, some of the most frequently used are:
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.
The following commands can be used to update the indicated content types:
DGNLIB UPDATEDGNLIB UPDATE ALLDGNLIB UPDATE DETAILINGSYMBOLSTYLESDGNLIB UPDATE DIMSTYLESDGNLIB UPDATE LEVELSDGNLIB UPDATE LEVELS ALLDGNLIB UPDATE LEVELS BYLEVELSYMBOLOGYDGNLIB UPDATE LEVELS CUSTOMDGNLIB UPDATE LEVELS OVERRIDESYMBOLOGYDGNLIB UPDATE MLINESTYLESDGNLIB UPDATE TEMPLATESDGNLIB UPDATE TEXTSTYLES
This is a very useful article. Is there a way to link it to MicroStation CONNECT's on-line help?