You are here: Popular Formats > Bentley MicroStation Design Reader/Writer

Bentley MicroStation Design Reader/Writer

The Bentley® MicroStation Design Reader/Writer allows FME to access files used by the MicroStation and Intergraph Interactive Graphics Design System (IGDS).

Intergraph made public the specification for this file format, which they call the Intergraph Standard File Format (ISFF)1Throughout this chapter, the terms IGDS file and Design file are used interchangeably to refer to the ISFF format.. This chapter assumes familiarity with this format.

Overview

Design files consist of a header, followed by a series of elements. The header contains global information including the transformation equation from design units to user coordinates, as well as the dimension of the elements in the file. Each element contains standard display information, such as its color, level, class, and style, as well as a number of attributes specific to its element type. For example, a text element has fields for font, size, and the text string in addition to the standard display attributes.

Tip: The IGDS reader and writer modules support both two- and three-dimensional Design files and cell libraries.

Individual design file elements must be less than a system-imposed maximum number of bytes. Complex elements solve this problem by physically grouping individual elements together into an object that will be manipulated as a whole. The FME transparently handles such complex elements as single FME features. This situation occurs when text elements are grouped together into a single complex element headed up by a text node, and when linear or polygonal features have more than 101 vertices (Microstation V7) or 5000 vertices (Microstation V8). Cells are complex elements used as symbols, and are treated as atomic entities by the FME.

Each IGDS file element may have one or more attribute linkages associated with it. The IGDS reader and writer support both user data and database linkages. (Note that the DGN V8 reader supports the interpretation of FRAMME linkages, but the writer does not.) The linkage values may be used to join elements with attributes stored in relational tables through the use of the Joiner or FeatureMerger Workbench transformers. Linkages may also be used to specify fill information for fillable IGDS area geometries such as Shape elements, and other application-specific data. (Note, however, that the igds_fill_color attribute will override any solid fill color linkage specification if both are present.)

Because Design files support three interpretations of units, the IGDS reader and writer must be told how to interpret the feature coordinate units and how they will be converted to and from Units of Resolution (UORs). The feature coordinate units may be interpreted as Master Units, SubUnits, or as raw UORs, depending on the setting of IGDS_UNITS in the mapping file. These units are all relative to working coordinates. See the DGN V8 Assume Master Units Equal Working Units reader parameter for further details on DGN V8 reading.

In contrast, when writing to DGN V8 files, the writer ignores these settings from the mapping file and adopts the settings as read from the seed file chosen. This means that if you want to do something special with the working units, you have to do that in the V8 seed file.

The IGDS reader and writer use symbolic names for the IGDS element types rather than the IGDS numeric values. This greatly simplifies element type specification.

The following table maps the supported IGDS element types to their corresponding FME feature igds_type attribute value that is used by the IGDS reader and writer. Subsequent subsections describe the handling of each of these element types in detail.

Note: Some element types may map to multiple igds_type values, depending on their form or simplicity. For example, a Line may map to an igds_point if it contains only one unique point.

IGDS Element Type

FME igds_type

2, Cell header

igds_cell

3, Line

4, Line string

12, Complex string

igds_point

3, Line

4, Line string

11, Curve

12, Complex string

27, B-Spline curve

33, Dimension

36, Multi-line

igds_line

6, Shape

14, Complex shape

igds_shape

7, Text node

igds_text_node

11, Curve

12, Complex string

igds_curve

12, Complex string

igds_complex_string

14, Complex shape

igds_complex_shape

15, Ellipse

igds_ellipse

16, Arc

igds_arc

17, Text

37, Tag attribute

igds_text

7, Text node

17, Text

igds_multi_text

2, Cell header

igds_solid

35, Shared cell header

igds_shared_cell

19, Solid (V8 only)

23, Cone

igds_3d_solid

100, Reference attachment (V8 only) igds_xref
39, DgnStore header (V8 only) igds_xfmstore
106, Polygon collection igds_polygon_collection
107, Non-geometric collection igds_nongeom_collection

Design files can store custom data as elements and linkage attributes. One such case is the XML-based Feature Modeling (XFM) data associated with the Bentley Map application. The XFM data in design files represent an instance of XFM feature and property information as a part of a Bentley Map project. The Bentley Map project defines a schema for XFM features, and the properties of those features, as well as the domains for those properties among other things. The DGN V8 Reader/Writer has been enhanced to support reading and writing of XFM data stored in Design files. Care should be taken that transformation of XFM data does not violate the overall coherency with the Bentley Map project.

XFM Features

Note that XFM features handled by the DGN V8 Reader/Writer represent a normalized form of XFM features. See the Bentley Map XFM Design format for an alternative object representation.

Reader Overview

The FME reader detects the version of the source dataset (version 7 or 8) internally and handles it accordingly. There is no difference to users in terms of the reader keyword or attribute names of the elements.

The IGDS reader first reads the header information from the Design file being processed, and extracts the conversion parameters required to translate coordinates from internal IGDS UORs to ground units. These units are all relative to working coordinates. See ASSUME_MATCHING_UNITS for further details on DGN V8 reading. It also determines the dimension of the input file.

It then extracts each individual element, one at a time, and passes it on to the rest of the FME for processing. Complex elements are extracted as single FME features. If a complex element contains an arc, then the reader automatically converts it to a linestring enabling it to be processed by all other readers and writers within the FME. If the element had any attribute linkages attached to it, these are read and added as attributes to the FME feature being created.

When the IGDS reader encounters an element type it does not know how to process, it simply ignores it and moves on to read the next element.

DGN Version 8 also reads the models to which the features belong. All the models read retain their respective working units and global origin values.

Dataset

The value for the Reader Dataset is the file name of the IGDS file to be read. For example:

/usr/data/dgn/92b034.dgn

Writer Overview

To create a new Design file, header information is obtained from an existing Design file, called a seed file. The IGDS writer first copies the seed file’s header information to the destination file, and then extracts the conversion parameters required to translate coordinates from feature coordinate units to internal IGDS UORs2Since coordinates in Design files are ultimately stored as integer UORs, it is possible for precision to be lost or overflow to occur when they are output. Care must be taken to ensure that the conversion parameters in the seed file preserve the data precision and range.. This header information includes type 68 FRAMME elements for V7 only, and type 100 external file reference elements. The IGDS writer uses the seed file to determine whether the destination file will be two-dimensional or three-dimensional. The V8 Design file writer also uses the seed file to set up the models which may have elements written to them.

Because seed files with a sufficient ground range and resolution may be difficult to obtain, the IGDS V7 writer allows seed parameters to be overridden in the mapping file. When a seed file with insufficient range available is used, the IGDS V7 writer will report that features were outside of the bounds of the seed file, and suggest values for the global origin and UOR/subunit/master unit ratios to use. FME can also automatically adjust the V7 Design file by setting Set Seed File Parameters to Yes. Note that this facility has been taken away from the V8 writer – it is no longer necessary since V8 has a much larger design plane than V7.

Note: When translating from DGN version 8 to DGN version 7 or vice versa in FME Workbench, by default a v8 seed file is chosen from the set of seed files as provided by FME. This has to be changed to an appropriate version 7 or version 8 seed file in order to achieve a successful conversion. The seed file is used to determine which version the user intends to write. Also note that if the user picked a v7 seed file at the time of generating the workspace, the same workspace can be used to write to v7 or v8 by changing the seed file accordingly. But if a workspace was initially generated to write to v8, then it cannot be used to write to v7.

A cell library file may optionally be used by both V7 and V8 writer. Cell libraries contain named symbol definitions which can be used to depict point features. If a cell library is specified, the IGDS writer reads in all the cell definitions for later when cell features are output. The IGDS writer can use either 2- or 3-dimensional cell libraries, and will automatically convert the cell definitions to be of the correct dimension for output.

The IGDS writer then outputs each FME feature it is given. Most often, a single FME feature corresponds to a single IGDS element. If any linkages are specified for the element, they are also output. However, some of the IGDS element types cause several elements to be output as a complex unit, with the complex bit turned on. This occurs when a multi-line text object, a cell, or a closed shape or linear feature with more than 101 coordinates (5000 coordinates in V8) is output. The IGDS writer hides all of the details of complex element output.

The IGDS writer can be configured to do one of two things with linear features that have exactly two points. By default, a type 3 line elements will be created for such features. However, if Two Point Line Output is set to Type 4 Elements, then a type 4 linestring element will be created for the two-point linear feature.

Note: Design files (V7) can be a maximum of 32 MB in size. Files larger than this will not be completely read by Microstation. The IGDS writer will automatically split any design file it is writing into pieces to avoid overrunning this maximum size. When this happens, features that would have caused the size limit to be exceeded are written to additional design files as necessary. The additional files are named <basename>_#.dgn, where # starts at 1 and increases.

Dataset

The value for the Writer Dataset is the file name of the output IGDS file.

FME Knowledge Center

Search DGN

Search IGDS