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, since MicroStation XM Compress Design does not affect DGNLIBs.
DGNLIBs first appeared in the original MicroStation V8 release and were only used for storing levels. Since then many other uses have been developed for them.
Prior to DGNLIBs CAD Standards were largely distributed via seed files. Now the only things that really need to be in seed files are design file settings.
This makes life easier as one library of say, levels, is shared by an entire organization. Previously if a level changed all of the individual files that used it might need to be updated.
Some of the resources that can be stored in DGNLIBs are:
We deliver DGNLIBs that are necessary for operation during installation in the locations listed below.
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.
We also define paths where DGNLIBs can be found for each project, e.g.:
C:\ProgramData\Bentley\MicroStation V8i (SELECTseries)\WorkSpace\projects\untitled\DGNLIB\*.dgnlib
And for interface specific DGNLIBs,, e.g.:
C:\ProgramData\Bentley\MicroStation V8i (SELECTseries)\WorkSpace\interfaces\MicroStation\default\*.dgnlib
These locations can vary according to the application, interface and project in use.
Additionally we deliver a folder:
C:\ProgramData\Bentley\MicroStation V8i (SELECTseries)\WorkSpace\Standards\dgnlib
designed for storage of site standards. In most cases this Standards folder will be located on a network share. See MicroStation - QuickConfig Standard for an example of this.
AECOsim Building Designer users also have the option of a Company DGNLIBs folder specific to AECOsim Building Designer as discussed in Configuring AECOsim Building Designer #3 – Put a Company Dataset on the network and AECOsim Building Designer - QuickConfig Standard.
This can depend on the scale of your organisation, whether you often work with other users CAD Standards or simply personal preference.
The simple approach is to put everything in one library. However if on a project you need to use a client’s standards, you will then have to separate out the relevant parts.
I think the modular approach is the most manageable, and bear in mind that once your libraries are set up, they should not need frequent management. Also as the number of element/settings types that can be stored in a DGNLIB has grown the single DGNLIB approach has become less attractive.
What DGNLIBs do I need to add to my system?
The basics are:
DGNLIBs can be read from locations at the application, site (also for AECOsim Building Designer, company) and project 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 the Project Configuration File (PCF) should contain something like:
MS_DGNLIBLIST < $(_USTN_PROJECTDATA)dgnlib/*.dgnlib
Where the project folder defined by _USTN_PROJECTDATA contains a folder called dgnlib.
The < operator tells MicroStation to read the project DGNLIBs first
The site standards.cfg should contain
MS_DGNLIBLIST < $(_USTN_SITE)dgnlib/*.dgnlib
The < operator tells MicroStation to read the site DGNLIBs first
Do not set either of these 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 listed types of content:
DGNLIB UPDATE LEVELS/MLINESTYLES/TEXTSTYLES/DIMSTYLES/DETAILINGSYMBOLSTYLES/TEMPLATES/ALL
Levels can also be set to synchronise with their source library using the synchbylevel MDL controlled by a series of variables. That will be covered in another article.
Here you go:
CONNECT Edition - DGNLIBs
Was on my to do list after we added some new variables in U10
Great article, but needs extending to include MicroStation CONNECT!
I'm just getting into this DGNLIB so I have a few questions. I'm trying to understand the concept of DGNLIB's but how do you access them, or how do you save different items to them or update them? I've been living in a GIS environment and just getting refreshed and updated to Microstation again. Any help would be great. Thanks
Sorry, I overlooked your comment, first of all thank you!
My view is that the best way to manage level libraries is to keep a CSV file as the master copy. Make any changes in that CSV file and import them into either:
a) a clean DGNLIB that then replaces the existing (the existing file can be archived if necessary)
b) if only one or two levels just select those levels from the list in the dialog when importing.
Great Blog about DGN LIB!!! But what is the best way to go about editing names on a level dgnlib? Why does "update level" in level manager removed ALL the level inside the dgnlib? The example is that I want to rename A-Door, to A-Door-Locs. Seems like the level is lock but it is not lock. I am working in the single source of truth dgnlib, so it shouldn't be circular reference by cfg setting. Let me know what how you are going about to editing name within a level dgnlib. Thank you!