Configuration Datasets
- Last UpdatedNov 27, 2025
- 4 minute read
DGN files (for use in MicroStation) may also be created from Draft Sheets. DGN is a binary format, and has two main variants - the older version 7 format (as used by MicroStation/J)and the current version 8 format (as used by MicroStation V8 and later versions). Many of the configuration options were designed for the version 7 format, and may not apply in quite the same way for a version 8 file. In future releases version 7 specific behavior may be removed or deprecated.
It is possible to control the format of DGN output using configuration datasets. The configuration dataset controls how the database information is to be mapped into DGN format. It does the following:
-
Controls how Draft graphics are to be grouped as DGN Group definitions.
-
Enables database elements to be assigned to DGN Levels.
-
Maps linestyles, colours and fonts between Draft and DGN.
-
Allows database attribute information to be exported from Draft as DGN Group attributes.
The configurable DGN facility uses ‘loadable image’ (LI) applications, usable at Sheet level. The DGN export application can be executed using the LIEXEC command (which also loads the application if it has not already been loaded).
The following example command uses the configuration dataset ’MyConfigData’ to control the export of DGN information:
LIEXEC /Draft_DGN_LI ’DGNOUT’ ConfigData ’MyConfigData’
Here ’DGNOUT’ is an application feature, and is used to indicate the version of Microstation for the exported file. This keyword may also take the values ‘DGN7’, ‘DGN8’.
This will create a DGN file with a name and format defined in the specified dataset for the current Sheet element. Before giving the above command, the configuration dataset must have been defined in Draft. This may be done either by typing in the configuration data at the command line; by building up the required mappings using the Draft applicationware; or by reading in a predefined macro file.
Other commands related to this facility are:
|
LILIST |
Lists features of application(s) loaded by LILOAD/LIEXEC. |
|
DLICON name |
Defines a named set of configuration options. For example: DLICON /myconfig configuration_options EXIT |
A Draft Configuration Dataset is made up of a series of Switches, Group rules and Level rules. The configuration_options will contain the GROUP, LEVEL and SWITCH syntax that controls the content of the DGN file produced.
|
Example: |
|---|
|
SWITCH LevelDefault '63' Level 63 to be used by default SWITCH SeedFileName 'seed.dgn' Specifies the DGN header file name GROUP ALL EQUI, INCLUDE NAME A group will be created for each equipment, which will be tagged with its name LEVEL ALL NOTE, 'ON 32' Level 32 to be used for NOTE elements |
Switch names are case-independent, but are shown as mixed case here to aid legibility. Switch values are text strings, and should be quoted.
Rules for Groups and Levels use PML expressions, similar to those used in Representation rules. GROUP rules may be followed by the INCLUDE argument to tag the group with attribute data; LEVEL rules should be followed by a text string defining the level or range of levels to be used.
Note: For full details of using expressions in Marine, see the Design Reference Manual, Part 1.
The configuration options may be overridden by LIEXEC command line options. In particular, the OutputFileName switch would normally be overridden by an LIEXEC option.
|
Example: |
|---|
|
LIEXEC /Draft_DGN_LI 'DGNOUT' CONFIGDATA 'MyConfigData' |
It is also possible to omit the CONFIGDATA, in which case the default values of all the switches will be assumed, the internal default seed will be used, and no grouping or levelling will take place.
The datasets currently defined within Draft can be determined by:
DLICON LIST
The definition of a specific dataset can be determined by:
DLICON name DUMP
The value of a specific switch within a dataset can be determined by:
DLICON name CHECK SWITCH switchname
For example, to query the value of the UNITS switch in the configuration /myconfig:
DLICON /myconfig CHECK SWITCH Units
Whether there is a grouping or levelling rule applicable to a specified Design or Draft element can be determined by:
DLICON name CHECK GROUP element_identifier
DLICON name CHECK LEVEL element_identifier
For example, to query whether the configuration contains a level rule which applies to /PUMP1:
DLICON /myconfig CHECK LEVEL /PUMP1
Sample Configuration Datasets
Sample configuration files are provided in the %PDMSDFLTS% directory as PML data files (pmldat). Further configuration files can be created using the Draft applicationware. The supplied configuration files include:)
|
dra-dgn-basic.pmldat |
Defines a restricted range of essential settings for configured DGN output. |
|
dra-dgn-pdms.pmldat |
Defines a sample set of configuration settings to produce fully-grouped and levelled DGN files closely mapped to the Draft Sheet exported. Note: The grouping and levelling commands for Design graphics in this file are only intended as an example, and may require modification to suit your own requirements. |
|
dra-dgn-imperial.pmldat |
Defines an equivalent set to dra-dgn-pdms.pmldat, in imperial-units. |
|
dra-dgn-nnnn.pmldat |
Defines a sample set of configuration settings that uses levelling by pen number, and uses text size to select levels for annotation (metric units). |
|
dra-dgn-dddd.pmldat |
Defines a sample set of configuration settings that uses levelling by functional descriptions (imperial units). |
|
dra-dgn-basicTT.pmldat |
Defines the same restricted range of as essential settings as dra-dgn-basic.pmldat above but with settings for TrueType fonts. |
|
dra-dgn-pdmsTT.pmldat |
This is defines the be the same as dra-dgn-pdms.pmldat above but with settings for TrueType fonts. |
Note: These configuration files may be converted to command-line macro files for batch creation of DGN files, using the Plant applicationware as follows:
!dgn = object dgnout()
!dgn.load( !!file( ‘%PDMSDFLTS%/name.pmldat’
!dgn.save( !!file( ‘%PDMSUSER%/name.pmldat’
where name is one of the supplied configuration datasets. The macro file %PDMSUSER%/name.mac is created when the PML data file is saved.