Import Microstation DGN File(s)

Use the Map > Import > Microstation DGN File(s) menu option (IMPORTDGN GX), to import a Microstation DGN file into an Oasis montaj map. Information about the plotted objects and about the "attribute" data may be stored to a new or current database, while the graphical objects are plotted to a new map or to the current map. This import does NOT support the newer DGN V8 format.

Use the Add to 3D >  Imports > Microstation DGNFile(s) menu option (IMPORTDGN GX, to add a Microstation DGN file to a 3D View.

Microstation DGN Import dialog options (3D View)

Microstation DGN file(s)

Select one or more Microstation DGN (*.dgn) files to import.

Script Parameter: IMPORTDGN.FILES (Separate files with the "|" character.

Import Microstation DGN File(s) dialog options (Map)

Microstation DGN file(s)

Select one or more Microstation DGN (*.dgn) files to import.

Script Parameter: IMPORTDGN.FILES (Separate files with the "|" character.

Create map element database?

Select whether to import information about the individual graphical elements to a new database.

Script Parameter: IMPORTDGN.DBOUT (0: no (default), 1: yes)

Current Map

Click this button to import the file(s) to the current map.

Script Parameter: IMPORTDGN.MAPOUT (Option: 0: Current Map)

New Map

Click this button to import the file(s) on a new map.

Script Parameter: IMPORTDGN.MAPOUT (Option: 1 : New Map)

Import to a New Map dialog options

Project data as

If the default option, "Plan" is selected, the data will be presented as a simple plan map. Select "E-W Section" to present and project the data as an East-West vertical section. Select "N-S Section" to present and project the data as a North-South vertical section.

Script Parameter: IMPORTDGN.ORIENT (0 : Plan, 1 : E-W, 2 : N-S)

  • When the data is projected to a 2D view (plan or section) some 3D information can be lost. See the Application Notes below for more information.
  • Map scale

    Optional map scale for 2D views. If not specified, a new map with default size 30cm by 30cm is created, with a map scale determined to fit the data.

    Script Parameter: IMPORTDGN.MAPSCALE (default = not defined)

    Create a New Map dialog options

    Map name

    Specify the name of the new map. Automatically pre-populated with the same name as the input Microstation DGN  file name.

    Script Parameter: IMPORTDGN.MAP

    Create a New Database dialog options

    DGN file

    Not editable. Set to the input Microstation DGN file name.

    Database name

    Specify the name of the new database. Automatically pre-populated with the same name as the input Microstation DGN file name.

    Application Notes

    • If the Microstation DGN file(s) are imported to a current map, the imported data will be projected onto the plane of the current data view. If the view is a normal "plan" view, then the Z-dimension information will be lost. If the view is a "section" view (such as those created for drillhole sections in Target), the data is projected horizontally onto that plane. If imported to a 3D View, the objects are plotted as in the original files.

    • A Microstation DGN file contains a list of geographic "elements" each of which may have a corresponding set of "attribute" data. Each DGN element has its analogue in an Oasis montaj map. The linkage between the feature and the data is maintained by writing the X and Y location values for each shape to the Oasis montaj database, along with the data. Use the shadow cursor, as normal, to find the correspondence between rows in the database and features on the map.

    • There is no simple way to import attribute data into a "flat file" format, since the storage format can differ between different elements in the same DGN file; e.g. two polygon objects could be linked to completely different databases with different sets of attributes. In addition, the links themselves can be chained, so that one link with one set of data leads to another set of attribute data. Instead, some basic information about the linkage is displayed as channel data (see below). Only information on the first linkage is returned.

    • DGN file elements are written to the "DGN" view in a map. The group name is the same as the Microstation DGN file’s name, with the particular levels appended; e.g. "DGN_MyMap_023". There is no fixed convention to which levels display what objects. In fact, in many files the majority of objects are put into one or two levels, while the small remaining elements are scattered among many levels!

    • All DGN files will be imported into the same map. A separate "group line" in the database is created for each DGN file.

    • The DGN import has been implemented using the Open-source DGNLib library, written by Frank Warmerdam: http://gdal.velocet.ca/projects/dgn/.

    DGN element
    Oasis montaj Map Object
    Notes

    Line and Line String Objects

    Lines & Polylines

    The X and Y values written to the Oasis montaj database represent the centre of the bounding rectangle for DGN line objects. An "infinite" line is approximated by taking the input line ends and extending them 0.5m in each direction.

    Arc

    Arc

    Oasis montaj now supports arc objects, and translates DGN arcs exactly.

    Ellipse

    Ellipse

    Supported directly, with an optional fill colour. Holes in ellipses are not supported directly. If a DGN Ellipse contains a hole, the entire object is converted into a Multi-polygon object.

    Curve

    Polyline

    A DGN Curve is a parametric line description, assuming a particular equation between the points. This is approximated in Oasis montaj by creating a normal "polyline" object with three times as many points, using the correct parametric formula, and with the Smoothing attribute enabled.

    Shape

    Polygon

    The X and Y values written to the Oasis montaj database represent the centre of the bounding rectangle for DGN Shape objects. Regions can be filled with a solid colour. Holes in polygons are supported directly.

    BSpline

    Not supported

    Not supported – ignored on import.

    Text

    Text

    Text is imported preserving height, angle and colour, but the default font is currently used.

    Database Channels Created

    X, Y

    Geometric center of the plotted object, found by taking the mid-point in X and Y.

    ID

    Index to the element in the DGN file (starting at 0).

    Type

    The object type. The following is a listing of the types of elements imported:

    • DGNT_LINE   3
    • DGNT_LINE_STRING  4
    • DGNT_SHAPE   6
    • DGNT_CURVE   11
    • DGNT_ELLIPSE 15
    • DGNT_ARC 16
    • DGNT_TEXT 17

    Level

    The level of the object in the file, a number from 0 to 255. Not all levels are present, and only those objects actually plotted are represented in the database.

    Group

    The "graphics group". It is not known what this corresponds to, but it may be an alternate way to sort the data.

    Xmin, Xmax, Ymin, Ymax

    The minimum and maximum bounds of the object in X and Y.

    AtBytes

    The number of bytes of attribute data linked to. If the attribute data is not stored inside the DGN file, but as a link to an external database, this value is likely to be 48.

    LinkType

    Types of attribute linkage. Some indicate a type of database, other internally stored attributes. The following are known types:

    • DGNLT_DMRS 0x0000
    • DGNLT_INFORMIX 0x3848 (14408)
    • DGNLT_ODBC 0x5e62 (24162)
    • DGNLT_ORACLE 0x6091 (24721)
    • DGNLT_RIS 0x71FB (29179)
    • DGNLT_SYBASE 0x4f58 (20312)
    • DGNLT_XBASE 0x1971 (6513)
    • DGNLT_SHAPE_FILL 0x0041 (65 – Used for shape fill colour)

    EntityNum

    The index of the attribute data in the linked database table. Although the actual data is not imported, this may be useful in determining which attribute data in the linked database is being pointed to.

    MSLink

    If defined, then the attribute data contains a link to yet more attribute data?

    LinkSize

    Number of bytes of data in the linked database?